[Numpy-discussion] equality with masked object
Sasha
ndarray at mac.com
Tue Apr 25 06:17:13 CDT 2006
On 4/25/06, Lionel Roubeyrie <lroubeyrie at limair.asso.fr> wrote:
>
> Why 5.0 == -- return True? A float is it the same as a masked object?
> thanks
It does not. It returns ma.masked :
>>> test[3] is ma.masked
True
You should not access masked data - it makes no sense. The current
behavior is historical and I don't really like it. Masked scalars are
replaced by ma.masked singleton in subscript operations to allow a[i]
is masked idiom. In my view it is not worth the trouble, but my
suggestion to get rid of that feature was not met with much
enthusiasm.
More information about the Numpy-discussion
mailing list