Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yurlungur/cython-example
A little example of how Cython works.
https://github.com/yurlungur/cython-example
Last synced: 13 days ago
JSON representation
A little example of how Cython works.
- Host: GitHub
- URL: https://github.com/yurlungur/cython-example
- Owner: Yurlungur
- Created: 2014-10-13T04:16:52.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-13T04:17:19.000Z (about 10 years ago)
- Last Synced: 2023-03-23T17:06:12.303Z (almost 2 years ago)
- Language: Python
- Size: 102 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
CYTHON EXAMPLE
======================================================================Author: Jonah Miller ([email protected])
Time-stamp: <2014-10-13 00:14:14 (jonah)>Open the IPython notebook through a walkthrough of how to change raw
Python code to Cython code and to look at the speedup it gives.Or open the *.pyx file to look at what a Cython file looks like.
To compile the Cython code, simply run:
python setup.py build_ext --inplaceThe setup.py defines which files to compile. The files ending in .pyx
are Cython files.Cython will generate two types of files: files ending in .c and files
and files ending in .o. The files ending in .c are c source code that
was generated based on the Python code. The files ending in .o are
compiled library files that Python can read. To use a file named
library.o, simply start Python and type:
import library