[Numpy-discussion] equality with masked object

Lionel Roubeyrie lroubeyrie at limair.asso.fr
Tue Apr 25 00:39:04 CDT 2006


Hi all,
I have a problem with masked_object (and masked_values to) like in this sort 
example :
###########################################
lionel[Données]8>test=array([1,2,3,inf,5])

lionel[Données]9>test = ma.masked_object(test, inf)

lionel[Données]10>print test[3], type(test[3])
-- <class 'numpy.core.ma.MaskedArray'>

lionel[Données]11>print test.max(), type(test.max())
5.0 <type 'float64scalar'>

lionel[Données]12>test[3] == test.max()
       Sortie[12]:
array(data =
 [True],
      mask =
 True,
      fill_value=?)
###########################################

Why 5.0 == -- return True? A float is it the same as a masked object?
thanks

-- 
Lionel Roubeyrie - lroubeyrie at limair.asso.fr
LIMAIR
http://www.limair.asso.fr





More information about the Numpy-discussion mailing list