Octave as a module for Python
Jaroslav Hajek
highegg at gmail.com
Wed May 6 05:17:47 CDT 2009
On Tue, May 5, 2009 at 9:32 PM, David Grundberg <c04dgg at cs.umu.se> wrote:
> Announcing Pytave
>
> An Octave module for Python
> ===========================
>
> Pytave enables Python scripts to use existing m-files (Octave/Matlab
> scripts) for numerical calculations. Pytave embeds the Octave
> language interpreter as a module to Python.
>
> This new revision allows dictionaries and lists to be passed to
> Octave.
>
> Example use
> ===========
>
> Calling Octave code in the interactive Python interpreter:
>
> >>> import pytave
> >>> pytave.feval(1, "cos", 0)
> (1.0,)
>
> Goals
> =====
>
> Pytave strives to uphold these points
>
> * Good out of the box experience
>
> * Good-natured implicit type conversions, no strange PyApple ->
> octave_orange -> PyBanana chains
>
> Features
> ========
>
> A short list of what Pytave is capable of
>
> * Implicit type conversions between Python and Octave. Supports all
> Numeric integer, real double (and possibly real float) matrices
>
> * Architecture independent - no assumption on endian type or integer
> sizes
>
> * Supports cell <-> list and struct <-> dict conversions. (NEW)
>
> Project homepage
> ================
>
> https://launchpad.net/pytave
>
> Using/hacking
> =============
>
> You need the Bazaar version control software (bzr). Branch from trunk
> with:
>
> $ bzr branch lp:pytave
>
> You will now have a directory called `pytave' with source code for
> the module. Read the INSTALL file for building instructions.
>
> _______________________________________________
> Help-octave mailing list
> Help-octave at octave.org
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>
Hi David,
I have wrapped also the "eval" function into pytave - see the attached
patch (created using bzr diff). How should I go about it? Should
contributions be reported as bugs using the launchpad tracker? Sorry I
have no experience with neither bazaar nor launchpad.
summary:
"eval" is provided as a wrapper to eval_string (parse.h). In
principle, this could be achieved more simply using feval("eval", but
the advantages are:
1. faster (avoids double call and double conversion of code string)
2. explicit control of printing rather than implicitly with nargout (as in eval)
3. a separate exception class for parse error
regards
--
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pytave_eval.diff
Type: text/x-patch
Size: 8939 bytes
Desc: not available
Url : https://www-old.cae.wisc.edu/pipermail/help-octave/attachments/20090506/51b7d001/attachment.bin
More information about the Help-octave
mailing list