[SciPy-user] port C/C++ matlab mexing code to numpy

Brian Blais bblais at bryant.edu
Mon Apr 24 12:04:52 CDT 2006

Gennan Chen wrote:
>>>>> We have a a lot of C/C++ code written for interacting with Matlab
>>>>> (i.,e mexing code). I was wondering what's the best approach to  
>>>>> port
>>>>> them into python/numpy/scipy? How about using SWIG? Any
>>>>> recommendation will be welcomed....

although more work in the short run, I have found it faster often to port my mex code 
to Pyrex (http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/).  it's by hand, but 
the syntax is so close to Python that the porting wasn't hard, and some of the C-code 
I could simply include in a .h, and link in.



             bblais at bryant.edu

More information about the SciPy-user mailing list