Antoine Pitrou wrote:
Hello,
The Py_buffer struct has two pointers named `shape` and `strides`. Each points
to an array of Py_ssize_t 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
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com