octave-maintainers
[Top][All Lists]
Advanced

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

Re: PyTave and Symbolic


From: Abhinav Tripathi
Subject: Re: PyTave and Symbolic
Date: Mon, 23 May 2016 12:26:40 -0700


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:

So, we don't need to have @sym conversion logic in pytave anymore? Instead just bring it to 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.

I saw the files. It seems python_header.py and extractblock.m could be replaced with 1 mechanism in python_ipc_pytave.m (or in any other file).
I saw the fields that python_header.py is generating and how they are used in extractblock to create @sym object. I am assuming that all those fields are to be generated using pyeval and then used to generate the sym object. (probably by needing a new file like check_and_extract.m to check if it's a sympy object then do the conversion as required or else just return the _outs[0].
I'm working on this line and will probably submit a PR (on github) by tomorrow night (just to have an initial review and get guidance)...
.
Just one more question though, we need to ensure that proper version of pytave is being used on the user's end. (i.e., including the @pyobj as in ur bookmark). How do you propose to do that? (probably by first merging the changes in Mike's repo)
.
And, we are assuming that user builds pytave manually. Shouldn't we including something like automatic download and install of pytave (if pytave mechanism in supported -- atleast in *nix systems)?
.
Sorry for a lot of questions, I just wanted it all cleared out before submitting first code for review.
.
Abhinav

reply via email to

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