[Numpy-discussion] Latest Array-Interface PEP
oliphant at ee.byu.edu
Thu Jan 4 18:15:30 EST 2007
Colin J. Williams wrote:
> Travis Oliphant wrote:
>> I'm attaching my latest extended buffer-protocol PEP that is trying to
>> get the array interface into Python. Basically, it is a translation of
>> the numpy header files into something as simple as possible that can
>> still be used to describe a complicated block of memory to another user.
>> My purpose is to get feedback and criticisms from this community before
>> display before the larger Python community.
> It would help me to understand the proposal if it could be explained in
> terms of the methods of the existing buffer class/type:
> ['__add__', '__class__', '__cmp__', '__delattr__', '__delitem__',
> '__delslice__', '__doc__', '__getattribute__', '__getitem__',
> '__getslice__', '__hash__', '__init__', '__len__', '__mul__', '__new__',
> '__reduce__', '__reduce_ex__', '__repr__', '__rmul__', '__setattr__',
> '__setitem__', '__setslice__', '__str__']
> Numpy extends numarray's type/dtype object. This proposal appears to
> revert to the old letter codes.
It extends what is done in the array and struct modules of Python. The
old letter codes are useful on the c-level. They are 'hidden' behind an
enumeration however, and so should not be a big deal. But, the letter
codes are still useful in other contexts.
> I have had very limited experience with C.
Then this proposal will not be meaningful for you. This is a proposal
to extend something on the C-level. There is nothing on the Python
level suggested by this proposal.
More information about the NumPy-Discussion