[Numpy-discussion] Array Protocol change for Python 2.6 (original) (raw)

Travis Oliphant oliphant at ee.byu.edu
Fri Jun 9 16:05:50 EDT 2006


Tim Hochberg wrote:

I was going to say that it may help to think of arrayinterface as returning a view, since that seems to be the semantics that could probably be implemented safely without too much trouble. However, it looks like that's not what happens. arrayinterface->shape and strides point to the raw shape and strides for the array. That looks like it's a problem. Isn't:

>>> ai = a.arrayinterface >>> a.shape = newshape going to result in ai having a stale pointers to shape and strides that no longer exist? This is an implementation detail. I'm still trying to gather some kind of consensus on what to actually do here. There is no such array_interface attribute at this point.

-Travis



More information about the NumPy-Discussion mailing list