octave-maintainers
[Top][All Lists]
Advanced

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

Re: Just a note down of the upcoming changes to pytave - GSoC 2016


From: Abhinav Tripathi
Subject: Re: Just a note down of the upcoming changes to pytave - GSoC 2016
Date: Sun, 24 Jul 2016 09:15:11 +0530


On Jul 24, 2016 12:55 AM, "Mike Miller" <address@hidden> wrote:
>
> This is https://bitbucket.org/mtmiller/pytave/issues/25, right? Can you
> or Colin explain this a bit more? I'm not sure I understand the concrete
> changes to be made here and what the user interface will look like.
>

Yes, it's the same issue. Currently we run every code in 'main_namespace'. So all the imports and variables are defined in that namespace. When using symbolic, all the sympy functions are imported there. It can cause some problems (as Colin explained on the issue). Even "pyexec ('N=1')" will cause the sympy function 'N' to be overwritten.
.
So if we add an optional second argument to pyexec then we can pass that as the local namespace. Hence symbolic can run in its own namespace.

> > 3- Use (1) to implement calling of pyobjects with multiple arguments and
> > probably extend the same logic to pycall.
> > Or maybe we can extend pycall so that a pyobject maybe passed instead of a
> > function name. This will reduce duplicate code.
>
> This is mostly done already.
>

Currently a PyObject can be callled without arguments. We need to add calling a PyObject with arguments.

> The bug I filed about seg faults with Python 3.5 is an important task
> you can work on next. I'm trying to set the priority accordingly on the
> issue tracker, so use that.
>

Sure.

> > Just one more question (more of an octave question than pytave) -
> > If I write "s = 1" then s is considered to be double (not an integer!) in
> > octave. Why is the default type double when there is no decimal point
> > supplied?!
>
> Because this is Matlab's behavior that we must adhere to. The default
> numeric data type is a double. The mixed type conversion rules also
> reflect this, for example in C a double added to an int produces a
> double, but in Octave a double added to an int32 results in an int32.
>
> > This caused some trouble for me. Because if I send it to pytave it will be
> > converted to python float and hence I won't be able to use that variable as
> > an index to a list.
> > I have to do "s = int8(1)"  or some other int type for this simple thing...
>
> Yes. Since the default type in Octave is a double, doubles may be used
> as indices as long as they are integer-valued.
>
> At the moment I think this has to be, but we might special case methods
> like subsasgn, subsindex, and subsref for indexing if needed.
>
> --
> mike

Tatsuro wrote:
> From my straggle with build Pytave on windows, boost seems not to be a blocker.
> The blocker is a __imp_ symbol issue at linking which will often occur on windows build.
>

Definitely. But there should be some solution, right?
I could not find anything solid which would help us get rid of this problem. I will try to start the windows build again from scratch and then probably we can discuss the exact problems.
.

Abhinav


reply via email to

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