[Numpy-discussion] Questions about masked arrays

Gökhan Sever gokhansever@gmail....
Tue Oct 6 15:42:51 CDT 2009


Hello,

I have a sample masked array data as shown below.

1-) When I list the whole array I see the fill value correctly. However
below that line, when I do access the 5th element, fill_value flies upto
1e+20. What might be wrong here?

I[5]: c.data['Air_Temp']
O[5]:
masked_array(data = [13.1509 13.1309 13.1278 13.1542 -- 13.1539 13.1387 --
-- -- 13.1107
 13.1351 13.2073 13.2562 13.3533 13.3889 13.4067 13.2938 13.1962 13.1248
 13.0411 12.9534 12.8354 12.7392 12.6725],
             mask = [False False False False  True False False  True  True
True False False
 False False False False False False False False False False False False
 False],
       fill_value = 999999.9999)


I[6]: c.data['Air_Temp'][4]
O[6]:
masked_array(data = --,
             mask = True,
       fill_value = 1e+20)




2-) What is wrong with the arccos calculation? Should not that result the
same as with cos(d) result?



I[9]: d = c.data['Air_Temp'][4]


I[11]: cos(d)
O[11]:
masked_array(data = --,
             mask = True,
       fill_value = 1e+20)


I[12]: arccos(d)
O[12]:
masked_array(data = 1.57079632679,
             mask = False,
       fill_value = 1e+20)


Any ideas?

-- 
Gökhan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20091006/e6c4d194/attachment.html 


More information about the NumPy-Discussion mailing list