Cython tips and tricks
- If you get
fatal error: numpy/arrayobject.h: No such file or directory...compilation terminated
on cython compilation, make sure to addnumpy.get_include()
ininclude_dirs
from distutils.core import setup
from Cython.Build import cythonize
import numpy
setup(
name = 'Closed Loop App',
include_dirs=[numpy.get_include()],
ext_modules = cythonize(["ModelParams.pyx", "ModelRHS.pyx"]),
)
- Cython vs. Numba See comparison here