[Numpy-discussion] Another dumb structured array question
Tue Sep 29 15:46:09 CDT 2009
On Tue, Sep 29, 2009 at 15:32, David Warde-Farley <email@example.com> wrote:
> Is there an easy way to get multiple subdtypes out? e.g. if I have a
> dtype([('foo', 'i4'), ('bar', 'i8'), ('baz', 'S100')])
> and an array with that dtype, is there a way to only get the 'foo' and
> arr[('foo','bar')] doesn't seem to work.
A little bit of logic wrapped around
numpy.lib.recfunctions.drop_fields() should do the trick.
"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