[Numpy-discussion] comparing arrays with NaN in them.

Glen W. Mabey Glen.Mabey at swri.org
Fri Aug 24 11:46:39 EDT 2007


On Fri, Aug 24, 2007 at 05:25:43PM +0200, Matthieu Brucher wrote:
> It's the IEEE norm for flotting point numbers. You can have sevaral
> different NaN, although in this case, they are the same kind.
> Even if they are the same kind, the norm tells that NaN != NaN.

Someone mentioned using masked arrays.  There is one "standard" mask
that comes with numpy.ma (dunno about maskedarray -- is that still in
the scipy sandbox?).

Anyway, there could be another standard mask for NaN, which would serve
to simplify the answer to those who encounter this in the future ...

Glen



More information about the NumPy-Discussion mailing list