[SciPy-user] [RFC] running r, octave from python

Soeren Sonnenburg python-ml@nn7...
Sun Mar 8 15:44:46 CDT 2009


Dear all,

a Shogun 0.7.1 is out and available at http://www.shogun-toolbox.org

which contains one new feature that might be of interest to
python-scipy/numpy users. The eierlegendewollmilchsau interface. In
case you don't know what this term stands for use google images :-)

It is one file that will interface shogun to octave,r,python,matlab. It
provides commands to run code in foreign languages:

Example:

from elwms import elwms
import numpy
x=numpy.array([[1,2,3],[4,5,6]],dtype=numpy.float64)
y=numpy.array([[7,8,9],[0,1,2]],dtype=numpy.float64)

elwms('run_octave','octavecode', 'disp("hi")')
a,b,c=elwms('run_octave','x', x, 'y', y,
                'octavecode', 'class(x), disp(x),results=list(x+y,1,{"a"})')
res1=elwms('run_octave','x', x, 'y', y,
                'octavecode', 'disp(x); disp(y); results=x+y+rand(2,3)\n')
res2=elwms('run_octave','A', ['test','bla','foo'],
                'octavecode',
'''
disp(A);
disp("hi");
results={"a","b","c"}
''')


This would pass around matrices x and y do some processing and return
results. So you could use your old matlab scripts passing around strings
cells, or whatever (u)int8/16/32, single/double matrix type.

See http://www.shogun-toolbox.org/doc/elwmsinterface.html .
Don't even try to run octave from python from octave etc nested.
Neither octave, R nor python-numpy nor libshogun supports this :-)

Soeren



More information about the SciPy-user mailing list