[Numpy-discussion] Array Protocol change for Python 2.6 (original) (raw)
Sasha ndarray at mac.com
Thu Jun 8 17:07:55 EDT 2006
- Previous message (by thread): [Numpy-discussion] Array Protocol change for Python 2.6
- Next message (by thread): [Numpy-discussion] Array Protocol change for Python 2.6
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 6/8/06, Travis Oliphant <oliphant at ee.byu.edu> wrote:
... arraystruct (perhaps we could call this arrayinterface but I'm happy keeping the name the same too.)
+0 on the name change and consider making it a method rather than an attribute.
If arraystruct is a CObject then it behaves as it does now. If arraystruct is a tuple then each entry in the tuple is one of the items currently obtained by an additional attribute access (except the first item is always an integer indicating the version of the protocol --- unused entries are None).
-1
This will complicate the use of array interface. I would propose creating a subtype of CObject that has the necessary attributes so that one can do a.array_interface.shape, for example. I did not check if CObject is subclassable in 2.5, but if not, we can propose to make it subclassable for 2.6.
...
I would like to eliminate all the other array protocol attributes before NumPy 1.0 (and re-label those such as arraydata that are useful in other contexts --- like ctypes). +1
- Previous message (by thread): [Numpy-discussion] Array Protocol change for Python 2.6
- Next message (by thread): [Numpy-discussion] Array Protocol change for Python 2.6
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]