[Numpy-discussion] [RFE] Suport for version 3 of array protocol in numarray
Travis Oliphant
oliphant.travis at ieee.org
Sat Aug 26 04:34:15 EDT 2006
Francesc Altet wrote:
> Hi,
>
> I've lately ran into problems in numarray-->numpy conversions which are due to
> a lack of suport of the array procol version 3 on behalf of numarray. For
> more info on this issue see:
>
> http://projects.scipy.org/scipy/numpy/ticket/256
>
> and
>
> http://projects.scipy.org/scipy/numpy/ticket/266
>
> Question: is the numarray crew going to add this support anytime soon? If not,
> I'd advocate to retain support for version 2 in NumPy at least for sometime
> (until numarray gets the support), although I don't know whether this will
> complicate things a lot in NumPy.
>
> I personally don't need this functionality as I've found a workaround for
> PyTables (i.e. using the numpy.ndarray factory in order to create the NumPy
> object directly from the numarray buffer), but I think this would be very
> useful in helping other users (end-users mainly) in the numarray-->NumPy
> transition.
>
Remember it's only the Python-side of version 2 of the protocol that is
not supported. The C-side is still supported. Thus, it's only objects
which don't export the C-side of the interface that are affected. In
numarray that is the chararray and the recarray. Normal numarray arrays
should work fine as the C-side of version 2 is still supported.
I think the number of objects supporting the Python side of version 2 of
the protocol is small enough that it is not worth the extra hassle (and
attribute lookup time) in NumPy to support it.
It would be a good thing if numarray supported version 3 of the protocol
by adding the __array_interface__ attribute to support the Python side
of version 3.
-Travis
More information about the NumPy-Discussion
mailing list