[Numpy-discussion] Doc on dtypes
Mon Jul 14 21:15:46 CDT 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 ﬁeld names is also stored in the ﬁelds
dictionary under the key -1. This can be used to walk through all of the
named ﬁelds in offset order. Notice that the deﬁned ﬁelds 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 deﬁned ﬁelds.
More information about the Numpy-discussion