6 ms·
I'm not sure of your needs, but there's now reasonable support for efficient interaction with numpy arrays; see, eg http://docs.cython.org/src/tutorial/numpy.h
by another 16y ago
I'm not sure of your needs, but there's now reasonable support for efficient interaction with numpy arrays; see, eg
http://docs.cython.org/src/tutorial/numpy.html http://docs.cython.org/src/tutorial/numpy.html
and/or
http://conference.scipy.org/proceedings/SciPy2009/paper_2/full_text.pdf http://conference.scipy.org/proceedings/SciPy2009/paper_2/fu...
Some types of array addressing will take the slower---but still correct---invocation path through Python, but the common form is compiled to direct (albeit strided) array access.
- baltcode 16y agoThanks, that looks great! I used to do stuff like that with weave. It would be interesting to see the speed comparison for weave and cython.