[Numpy-discussion] Best way to insert C code in numpy code

David Cournapeau david@ar.media.kyoto-u.ac...
Mon Sep 21 05:50:40 CDT 2009

Xavier Gnata wrote:
> Hi,
> I have a large 2D numpy array as input and a 1D array as output.
> In between, I would like to use C code.
> C is requirement because it has to be fast and because the algorithm 
> cannot be written in a numpy oriented way :( (no way...really).
> Which tool should I use to achieve that?  waeve.inline? pyrex? What is 
> the baseline?

That's only a data point, but I almost always use cython in those cases,
unless I need 'very advanced' features of the C API in which case I just
do it manually.



More information about the NumPy-Discussion mailing list