[Numpy-discussion] Re: [SciPy-user] transition problems
oliphant.travis at ieee.org
Sun Dec 11 12:54:04 EST 2005
Christian Kristukat wrote:
>I noticed that using the new core together with older packages that are based on
>numeric, like the plotting module from wxPython, matplotlib, grace_np.py, etc.
>is problematic since numeric seems to be unable to recognize new core arrays as
>equivalent to the numeric ones.
If you get a recent version (>=24.0) of Numeric then it shouldn't be a
problem. One of the purposes of the array interface is to ease the
transition, but only recent versions of Numeric use it properly. If
there are problems with recent versions of Numeric and the array
interface then please post them.
Older versions of Numeric would need to use tostring and fromstring
(better than tolist...)
>In some cases it is sufficient to add a
>.tolist() to array parameters but that is not really satisfactory.
>Will a final version of new core have solved these incompatibilities?
Unfortunately, I don't know how to solve incompatibilities with older
versions of Numeric. All third-party libraries should either start
using only the array interface or switch to scipy_core.
I've noticed there is some confusion still circulating on the net that
the new arrayobject in scipy_core is going to get into Python at some
point, and some people are holding off making any changes until that
happens. I am probably the source of that confusion since at one time
I did have that goal. However, early on (in March) after discussions
with Paul, Perry, and Guido we decided that trying to force an
arrayobject into Python would place us on a release cycle that would be
constraining. So, don't wait to try out scipy_core because there is
nothing going into Python any time soon that is even as capable as
There are plans for getting a very simple arrayobject into Python
(largely to enshrine the array interface), but we really need help
moving that forward. With the recent changes to scipy_core, I think we
have a very good design for a generic array object with associated
data-descriptor that could go into Python. For python itself, I would
only say that descriptors should only be written for Object, integer,
float, and complex-float arrays. A PEP has been started and sits at
waiting for more people to help push it forward.
More information about the NumPy-Discussion