[Numpy-discussion] Octave-numpy bridge?

joep josef.pktd@gmail....
Tue Oct 21 08:27:13 CDT 2008



On Oct 20, 11:30 pm, David Cournapeau <da...@ar.media.kyoto-u.ac.jp>
wrote:
> Ravi wrote:
> > Hi all,
> >   Is anyone aware of a bridge between octave & numpy? As I port stuff from
> > Matlab to numpy, I noticed that most of my Matlab code has workarounds that
> > allow the code to be used from octave. My current methodology for porting is
> > to use octave to generate inputs/outputs for a function, then write the
> > results out in HDF5, read them into python+numpy, and compare the results.
> > This would be much faster, especially when dealing with mex files, if I could
> > use octave from my ipython shell, a la mlabwrap.
> >   I searched the web but did not find anything on this topic that was recent.
>
> Hi Ravi,
>

Hi,
I just saw this recently, but I have not yet looked at it more
closely
(since I am currently using matlab.)
The install explanation in http://bazaar.launchpad.net/~individ/pytave/trunk/files
looks very concentrated on Posix and I'm a windows user.

However, this seems what you are looking for.


see http://www.nabble.com/Python-to-Octave-bridge-td20031139.html

Announcing Pytave - Python to Octave extension

Embeds the Octave language interpreter as an extension to Python,
enabling existing m-files to be used from Python.

Features:
 * Implicit type conversions between Python and Octave. Supports all
Numeric integer, real double (and possibly real float) matrices
 * Architecture independent - no assumption on endianess or integer
sizes

Call Octave code in Python:
 >>> import pytave
 >>> pytave.feval(1, "cos", 0)
(1.0,)

Project homepage:
https://launchpad.net/pytave




More information about the Numpy-discussion mailing list