[SciPy-user] Automatic MATLAB to scipy/numpy/pylab conversion
Wed Jul 9 12:59:15 CDT 2008
On Wed, Jul 9, 2008 at 7:24 PM, Isaul Vargas <firstname.lastname@example.org> wrote:
> There are some issues in converting Matlab code to Python.
Tons of them infact :)
The idea is to handle the easy stuff via the script, and the harder
> Matlab has "dynamic arrays". Suppose you have a 1x 3 array, and you want to
> add a new row via this syntax:
> a[4,:] = b;
> This won't work in python. You will have to preallocated the array size
> Second, it's the 0 based indexing. Generally you shift indices by -1, but
> sometimes you may have to add a 1 to the end range .
This can be handled i think.
> Also concatenation can be a pain.
Currently using hstack and vstack
> Hope this helps.
I am working on the script right now. Will post it somewhere once the
thing starts working. Currently doing very basic stuff.
As Pete pointed out, for a full conversion, something like ANTLR will
More information about the SciPy-user