[Python-Dev] Allocation of shape and strides fields in Py_buffer
alexander.belopolsky at gmail.com
Tue Dec 9 04:01:18 CET 2008
On Mon, Dec 8, 2008 at 6:25 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
>> Alexander's suggestion of going and looking at what the numpy folks have
>> done in this area is probably a good idea too.
> Well, I'm open to others doing this, but I won't do it myself. My interest is in
> fixing the most glaring bugs of the buffer API and memoryview object. The numpy
> folks are welcome to voice their opinions and give advice on python-dev.
I did not follow numpy development for the last year or more, so I
won't qualify as "the numpy folks," but my understanding is that numpy
does exactly what Nick recommended: the viewed object owns shape and
strides just as it owns the data. The viewing object increases the
reference count of the viewed object and thus assures that data, shape
and strides don't go away prematurely.
I am copying Travis, the author of the PEP 3118, hoping that he would
step in on behalf of "the numpy folks."
More information about the Python-Dev