[Numpy-discussion] change the mask state of one element in a masked array
Chao YUE
chaoyuejoy at gmail.com
Sat Feb 18 10:52:27 EST 2012
Dear all,
I built a new empty masked array:
In [91]: a=np.ma.empty((2,5))
In [92]: a
Out[92]:
masked_array(data =
[[ 1.20569155e-312 3.34730819e-316 1.13580079e-316 1.11459945e-316
9.69610549e-317]
[ 6.94900258e-310 8.48292532e-317 6.94900258e-310 9.76397825e-317
6.94900258e-310]],
mask =
False,
fill_value = 1e+20)
as you see, the mask for all the elements are false. so how can I set for
some elements to masked elements (mask state as true)?
let's say, I want a[0,0] to be masked.
thanks & cheers,
Chao
--
***********************************************************************************
Chao YUE
Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
UMR 1572 CEA-CNRS-UVSQ
Batiment 712 - Pe 119
91191 GIF Sur YVETTE Cedex
Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20120218/e2efc477/attachment.html>
More information about the NumPy-Discussion
mailing list