[Numpy-discussion] Re: Bytes Object and Metadata
Francesc Altet
faltet at carabos.com
Wed Mar 30 02:45:00 EST 2005
A Dimarts 29 Març 2005 01:59, Travis Oliphant va escriure:
> My proposal:
>
> __array_data__ (optional object that exposes the PyBuffer protocol or a
> sequence object, if not present, the object itself is used).
> __array_shape__ (required tuple of int/longs that gives the shape of the
> array)
> __array_strides__ (optional provides how to step through the memory in
> bytes (or bits if a bit-array), default is C-contiguous)
> __array_typestr__ (optional struct-like string showing the type ---
> optional endianness indicater + Numeric3 typechars, default is 'V')
> __array_itemsize__ (required if above is 'S', 'U', or 'V')
> __array_offset__ (optional offset to start of buffer, defaults to 0)
>
Considering that heterogenous data is to be suported as well, and
there is some tradition of assigning names to the different fields, I
wonder if it would not be good to add something like:
__array_names__ (optional comma-separated names for record fields)
Cheers,
--
>qo< Francesc Altet http://www.carabos.com/
V V Cárabos Coop. V. Enjoy Data
""
More information about the NumPy-Discussion
mailing list