[Numpy-discussion] ma's maximum_fill_value function in 1.1.0
Reggie Dugard
reggie at merfinllc.com
Thu Jun 19 18:55:59 EDT 2008
This is just a minor question/problem with the new numpy.ma in version
1.1.0.
Because maximum and minimum in ma lack an accumulate attribute, I've
duplicated the functionality using the
maximum_fill_value/minimum_fill_value functions and doing something
like:
np.ma.masked_array(np.maximum.accumulate(np.ma.filled(x, np.ma.maximum_fill_value(x))), x.mask)
In version 1.0.4 of numpy, maximum_fill_value/minimum_fill_value were
located in ma's namespace so the above line would work. In the latest
version, the ma module has an __all__ which does not include
maximum_fill_value/minimum_fill_value and I'm forced to get them from
numpy.ma.core (which doesn't seem like a very clean way of doing it).
So I guess my question is: was this done intentionally and if so why,
or can these functions be added to __all__ to get the old behavior
back.
Thanks for your help with this.
--
Reggie Dugard <reggie at merfinllc.com>
Merfin, LLC
More information about the NumPy-Discussion
mailing list