[Numpy-discussion] Should the fields in void scalars be available?

Robert Kern robert.kern@gmail....
Fri Jun 27 17:37:26 CDT 2008

On Fri, Jun 27, 2008 at 17:13, Travis E. Oliphant
<oliphant@enthought.com> wrote:
> Robert Kern wrote:
>> The only inconsistency I can see here is that x.item() gives a tuple
>> rather than a scalar record. A scalar record does have field access,
>> but the tuple doesn't.
>> In [28]: x.item()['a']
> .item() always returns a standard Python type.  So, this is expected
> behavior.


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