[Numpy-discussion] Compile extension modules with Visual Studio 2005

Ray Schumacher subscriber100 at rjs.org
Wed Jul 25 09:38:55 EDT 2007

Geoffrey Zhu wrote:
 > Hi,
 > I am about to write a C extension module. C functions in the module will
 > take and return numpy arrays. I found a tutorial online, but I am not
 > sure about the following:

I agree with others that ctypes might be your best path.
The codeGenerator is magic, if you ask me:

But, if the function is simple, why not weave.inline? What I have 
done is run the function once, hunt down the long-named library, copy 
it to the local directory, then include it explicitly and call its 
function. This eliminates some overhead time for the call. I use it 
to convert packed IEEE data from an ADC data read function, and it's 
faster than the manufacturer's own function version that returns 
scaled integers!


More information about the NumPy-Discussion mailing list