Re: [Numpy-discussion] PyBUF_SIMPLE requests

2011-07-18 Thread Pauli Virtanen
Sat, 16 Jul 2011 12:42:36 +0200, Stefan Krah wrote: > x = ndarray(buffer=bytearray([1,2,3,4,5,6,7,8,9,10]), > shape=[10], strides=[-1], dtype="B", offset=9) [clip] > I do not understand the PyBUF_SIMPLE result. According to the C-API docs > a consumer would be allowed to access buf[9],

[Numpy-discussion] PyBUF_SIMPLE requests

2011-07-16 Thread Stefan Krah
Hello, I'm working on the completion of the PEP-3118 (buffer protocol) implementation in Python core. I was wondering how a PyBUF_SIMPLE buffer request sent to an object with a complex structure should behave. The current Python C-API documentation for a PyBUF_SIMPLE buffer request says: "This