Passing numpy arrays to matlab

David Cournapeau david at ar.media.kyoto-u.ac.jp
Tue Nov 7 22:07:08 EST 2006


Josh Marshall wrote:
> Hi David,
>
> Did you have a look at mlabwrap? It's quite hard to find on the net,  
> which is a shame, since it is a much more up to date version,  
> enhancing pymat with the things that you are trying to do. It allows  
> passing arrays and getting arrays back.
>
> http://mlabwrap.sourceforge.net/
>   
I didn't know that, thanks. Unfortunately, it is not really what I am 
trying to do: mlabwrap is just a python interface a bit more high level 
than pymat, with many fancy tricks, but still do copies. What I would 
like is to avoid completely the copying by using proxy classes around 
data from numpy so that I can pass "automatically" numpy arrays to 
matlab C api, and a proxy class around data from matlab so that they 
look like numpy arrays.
    I don't care that much about the actual api from python point of 
view, because I intend to use this mainly to compare matlab vs numpy 
implementation, not as a way to use matlab inside python regularly. And 
once the copy problem is solved, adding syntactic sugar using python is 
easy anyway, I think (it should be easy to do something similar to 
mlabwrap at that point),

    cheers,

    David

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642




More information about the NumPy-Discussion mailing list