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

David Goldsmith David.L.Goldsmith@noaa....
Fri Aug 24 11:33:04 CDT 2007


Never mind.  (Posted that before finishing the thread, sorry).

DG

David Goldsmith wrote:
> What is meant by "multiple nan-s"?
>
> DG
>
> mark wrote:
>   
>> 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
>>
>> ps. I have to admit though, that matlab does the same thing. nan==nan
>> is false.
>>
>> On Aug 24, 4:51 am, Warren Focke <fo...@slac.stanford.edu> wrote:
>>   
>>     
>>> On Thu, 23 Aug 2007, Christopher Barker wrote:
>>>     
>>>       
>>>> but that feels like a kludge. maybe some sort of "TheseArrays are binary
>>>> equal" would be useful.
>>>>       
>>>>         
>>> But there are multiple possible NaNs, so you couldn't rely on the bits
>>> comparing.
>>>
>>> Maybe something with masked arrays?
>>>
>>> w
>>>
>>> _______________________________________________
>>> Numpy-discussion mailing list
>>> Numpy-discuss...@scipy.orghttp://projects.scipy.org/mailman/listinfo/numpy-discussion
>>>     
>>>       
>> _______________________________________________
>> Numpy-discussion mailing list
>> Numpy-discussion@scipy.org
>> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>>   
>>     
>
>   

-- 
ERD/ORR/NOS/NOAA <http://response.restoration.noaa.gov/emergencyresponse/>


More information about the Numpy-discussion mailing list