[Python-Dev] Allocation of shape and strides fields in Py_buffer (original) (raw)
Travis Oliphant oliphant.travis at ieee.org
Wed Dec 10 16:44:06 CET 2008
- Previous message: [Python-Dev] Allocation of shape and strides fields in Py_buffer
- Next message: [Python-Dev] [PATCH] Make 2to3 --write preserve file mode (eg. execution bit)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Antoine Pitrou wrote:
Hello,
The Pybuffer struct has two pointers named
shape
andstrides
. Each points to an array of Pyssizet values whose length is equal to the number of dimensions of the buffer object. Unfortunately, the buffer protocol spec doesn't explain how allocation of these arrays should be handled.
I'm coming in late to this discussion, so I apologize for being out of order. But, as Nick later clarifies, the PEP does specify how allocation of these arrays is handled.
Specifically, it is the responsibility of the exporter to do it and keep them correct as long as the buffer is shared.
I have not been able to keep up with the python-dev mailing lists since I have been working full time outside of academia. I apologize for the difficulty this may have caused. But, I have been available via email and am happy to respond to specific questions regarding the buffer protocol and its implementation.
I will make some time during December to help clean up confusing issues. There are still pieces to implement as well (the enhancements to the struct module, for example), but I will not have time for this in the next 6 months because I would like to spend any time I can find on porting NumPy to use the new buffer protocol as part of getting NumPy ready for 3.0.
-Travis
- Previous message: [Python-Dev] Allocation of shape and strides fields in Py_buffer
- Next message: [Python-Dev] [PATCH] Make 2to3 --write preserve file mode (eg. execution bit)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]