[Numpy-discussion] feedback request: proposal to add masks to the core ndarray

Nathaniel Smith njs@pobox....
Fri Jun 24 11:11:40 CDT 2011

On Fri, Jun 24, 2011 at 8:30 AM, Robert Kern <robert.kern@gmail.com> wrote:
> I would suggest following R's lead and letting ((NA==NA) == True)
> unlike NaNs.

In R, NA and NaN do behave differently with respect to ==, but not the
way you're saying:

> NA == NA
[1] NA
> if (NA == NA) 1;
Error in if (NA == NA) 1 : missing value where TRUE/FALSE needed

This again is consistent with the semantics that NA represents some
unknown concrete value -- depending on what actual values, NA == NA
might or might not be true, we don't know. So it's NA as well.

-- Nathaniel

More information about the NumPy-Discussion mailing list