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

Matthieu Brucher matthieu.brucher@gmail....
Fri Aug 24 10:25:43 CDT 2007


2007/8/24, mark <markbak@gmail.com>:
>
> There may be multiple nan-s, but what Chris did is simply create one
> with the same nan's
>
> >>> a = N.array((1,2,3,N.nan))
> >>> b = N.array((1,2,3,N.nan))
>
> I think these should be the same.
> Can anybody give me a good reason why they shouldn't, because it could
> confuse a lot of people?
>
> Thanks, Mark
>

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.

Matthieu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070824/c934dd3f/attachment.html 


More information about the Numpy-discussion mailing list