octave-maintainers
[Top][All Lists]
Advanced

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

Re: PyTave and Symbolic


From: Colin Macdonald
Subject: Re: PyTave and Symbolic
Date: Sun, 22 May 2016 09:11:16 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0

On 22/05/16 07:54, Abhinav Tripathi wrote:
> Thanks. I went through the bookmark and the wiki.
> I didn't know how to pull and use bookmarks in mercurial. So, it took
> some time.

Same here :)

> I'll start from your code then and add upon it some more functionalities
> (adding conversion of @sym objects, to be specific)... Or should I add
> the functionality to main PyTave branch? (in case this is for testing
> only)...
> I still don't know about PRs in hg. So, I'll go through some more
> mercurial tutorials before adding the conversion of @sym objects...

I'm thinking we might *almost* have enough functionality in @pyobj that
you could try to use that directly in Symbolic's python_ipc_pytave.m:

After the line `pyexec(s)`, the stuff we want to return to Octave is in
a Python list called `_outs`.  Maybe we can just use something like:

tmp = pyeval('_outs[0]');

(note currently pyobj will not deal with the list correctly itself,
you'll need to get the elements of the list).

See python_header.py: "octoutput" function, specifically after the line
`elif x is None or isinstance(x, (sp.Basic, sp.MatrixBase)):`.  Compare
this to `extractblock.m` so see which properties of a SymPy Python
object we need to make a @sym object.

Colin



reply via email to

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