Skip to content

milladgit/python-c-extensions-tut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python C Extensions Tutorial

How to use?

# Python 2.x example
python setup.py build
python setup.py install
python test.py

Or,

# Python 2.x example
python setup.py build

# copy .so file from the ./build/lib.XXX/myModule.so folder to current folder

python test.py

Python 3:

Python 2

Python 2 & 3

Numpy

Building for CUDA support

Cext folder

This is a sample code borrowed from following link:

https://scipy-cookbook.readthedocs.io/items/C_Extensions_NumPy_arrays.html