[Numpy-discussion] Doc on dtypes
Pierre GM
pgmdevlist at gmail.com
Mon Jul 14 22:15:46 EDT 2008
On Monday 14 July 2008 21:56:47 Robert Kern wrote:
> > Oh, with dtype.names and dtype.fields I can work. The Guide mentions a
> > key [-1] in dtype.fields that should store the names in order: that would
> > be quite useful but it doesn't work (KeyError).
>
> Where do you see this mention?
Page 116 of my version (once again, 07/17/2006)
"""
An ordered (by offset) list of field names is also stored in the fields
dictionary under the key -1. This can be used to walk through all of the
named fields in offset order. Notice that the defined fields do not have
to “cover” the record, but the itemsize of the container data-type object
must always be at least as large as the itemsizes of the data-type objects in
the defined fields.
"""
More information about the NumPy-Discussion
mailing list