Neal Becker 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.
I'm wondering if having the buffer object specify the view is the right choice. I think the best choice is to separate the design into:
buffer: provides an interface to memory array: provides a view of memory as an array of whatever dimensions
- buffer may or may not map to contiguous memory.
- multiple views of the same memory can be shared. These different views
could represent different slicings.
I don't understand your concerns, could you please help clarify?
I'm not doing anything with the buffer object at all. I'm only using the buffer "protocol" (i.e. extending the set of function pointers pointed to by tp_as_buffer in the type-object).