[Numpy-discussion] Doc on dtypes

Robert Kern robert.kern@gmail....
Mon Jul 14 18:39:39 CDT 2008


On Mon, Jul 14, 2008 at 18:24, Pierre GM <pgmdevlist@gmail.com> wrote:
> On Monday 14 July 2008 18:53:41 Robert Kern wrote:
>> dtype.fields is a dict-like object containing the same information,
>> but accessible by field name.
>
> But as it's a dictionary, I can't use iteritems() without risking having the
> wrong order of fields, right ? Or do dictproxies behave differently ?

Right. If you want order, use dtype.descr, or sort on the last item in
the tuple. We can probably reimplement the dictproxy to guarantee
order.

>> Chapter 7 of _The Guide to Numpy_ has more content,
> Oh, of course... My version is just 2 years old, has there been much change
> about dtypes in the meantime ?

No.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
 -- Umberto Eco


More information about the Numpy-discussion mailing list