Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:

shape is a pointer to array of Py_ssize_t of size ndim. array and memoryview do 
a trick to avoid memory allocation, but _testbuffer.ndarray allocates it 
dynamically in the heap. We can add a small static buffer in Py_buffer to avoid 
additional memory allocation in common cases.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45459>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to