[Numpy-discussion] Should the fields in void scalars be available?
Robert Kern
robert.kern at gmail.com
Fri Jun 27 18:37:26 EDT 2008
On Fri, Jun 27, 2008 at 17:13, Travis E. Oliphant
<oliphant at 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.
Okey-dokey.
--
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