excellent thank you, that worked perfectly. I just need to remember this
feature next time I need it.
Thanks again
On Thu, Apr 12, 2012 at 11:41 PM, Tim Cera wrote:
> Use 'ma.max' instead of 'np.max'. This might be a bug OR an undocumented
> feature. :-)
>
> import numpy.ma as ma
> mar
Use 'ma.max' instead of 'np.max'. This might be a bug OR an undocumented
feature. :-)
import numpy.ma as ma
marr = ma.array(range(10), mask=[0,0,0,0,0,1,1,1,1,1])
np.max(marr)
4 # mask is used
a = []
a.append(marr)
a.append(marr)
np.max(a)
I am trying to mask an array and then add the array to a list, so I can
then go on and calculate the max, min and mean of that list.
The mask seems to work when I check each array. I check each array by
finding the max, mean and mean and comparing with the unmasked array (they
are different).
Howev