[Pythonmac-SIG] [ C Extension Scipy/Numpy

Zachary Pincus zachary.pincus at yale.edu
Fri Feb 26 15:21:35 CET 2010


>> I highly recommend that you use Cython instead:
>
>> It is much easier, and you are much more likely to make mistakes with
>> reference counting, etc, if you do it by hand. Trust me on this.
>
> There are a few version I tried, but because of the very high  
> mathematical effort I need the fastest solution, wich is doing it by  
> hand.
> I have a C-Version already - but I will try Cython again by calling  
> my C routines.

If you already have the C code compiled into a shared library, calling  
into the library with ctypes might be even easier. Especially since  
numpy arrays have handy attributes for getting pointers-to-data as  
ctypes objects.

Zach


More information about the Pythonmac-SIG mailing list