[Numpy-discussion] difference between ma.masked and ma.masked_array?

Timmie timmichelsen@gmx-topmail...
Mon Nov 17 14:42:08 CST 2008


Hello,
what is the difference between ma.masked and ma.masked_array?

I am using this expression along with the scikit.timeseries:

series[(series.years>2000)&(series.years<2010)]=np.ma.masked

=> but now, my series does not get masked.

Rather the selected values (left part of the '=') get set to 0.0.

But if I use 

arr_masked = \
ma.masked_array(series, series[(series.years>2000)&(series.years<2010)])

the masked is applied sucessfully.

This is very strange. for some examples it works to use the firt method, for
others not.

Any hint is appreciated.

Thanks in advance,
Timmie



More information about the Numpy-discussion mailing list