help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave as a module for Python


From: Jaroslav Hajek
Subject: Re: Octave as a module for Python
Date: Wed, 6 May 2009 12:17:47 +0200

On Tue, May 5, 2009 at 9:32 PM, David Grundberg <address@hidden> 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
> address@hidden
> 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

Attachment: pytave_eval.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]