Alexander Belopolsky wrote:
My main concern was that in ctypes the size of an array is a part of the datatype object and this seems to be redundant if used for the buffer protocol. Buffer protocol already reports the size of the buffer as a return value of bf_get*buffer methods.
I think what would happen if you were interoperating with ctypes is that you would get a datatype describing one element of the array, together with the shape information, and construct a ctypes array type from that. And going the other way, from a ctypes array type you would extract an element datatype and a shape.