Scott Gilbert wrote:
__array_itemtype__ Suggested, but Optional if __array_itemsize__ is present.
This attribute probably warrants some discussion...
A struct module format string or one of the additional ones that needs to be added. Need to discuss "long double" and "Object". (Capital 'O' for Object, Captial 'D' for long double, Capital 'X' for bit?)
If not present or the empty string '', indicates that the array elements can only be treated as blobs and the real data representation must be gotten from some other means.
I think doubling the typecode as a convention to denote complex numbers makes some sense (for instance 'ff' is complex float).
The struct module convention for denoting native, portable big endian, and portable little endian is concise and documented.
After more thought, I think here we need to also allow the "c-type" independent way of describing an array (i.e. numarray-introduced 'c4' for a complex-valued 4 byte itemsize array). So, pehaps __array_ctypestr_ and __array_typestr__ should be two ways to get the information (or overload the __array_typestr__ interface and reequire consumers to accept either style). -Travis