Re: [Pythonmac-SIG] C Extension Scipy/Numpy

2010-02-25 Thread Chris Barker
brennsuppa wrote: I want to gain performance by using C for the computation of some arrays. To do that I used this as a help: http://www.scipy.org/Cookbook/C_Extensions/NumPy_arrays I highly recommend that you use Cython instead: http://wiki.cython.org/tutorials/numpy It is much easier, and y

Re: [Pythonmac-SIG] C Extension Scipy/Numpy

2010-02-25 Thread Zachary Pincus
Hi, Probably better to: (1) Ask this on the numpy mailing list, and (2) Provide a complete, compilable example of the offending code. Also, you may find it easier to write a pure-C routine and call into it using ctypes (getting pointers via numpy arrays' ctypes attributes), or alternately, u

[Pythonmac-SIG] C Extension Scipy/Numpy

2010-02-25 Thread brennsuppa
Hi, I want to gain performance by using C for the computation of some arrays. To do that I used this as a help: http://www.scipy.org/Cookbook/C_Extensions/NumPy_arrays Now I want to wirte a subroutine for the calculations with several arrays. But I don't know how to pass the arrays to the subrou