[Numpy-discussion] Why does np.nan{min, max} clobber my array mask?

Pierre GM pgmdevlist@gmail....
Mon Feb 15 20:35:05 CST 2010


On Feb 15, 2010, at 8:51 PM, David Carmean wrote:
> On Sun, Feb 14, 2010 at 03:22:04PM -0500, Pierre GM wrote:
> 
>> 
>> I'm sorry, I can't follow you. Can you post a simpler self-contained example I can play with ?
>> Why using np.nanmin/max ? These functions are designed for ndarrays, to avoid using a masked array: can't you just use min/max on the masked array ?
> 
> I was using np.nanmin/max because I did not yet understand how masked arrays worked; perhaps the 
> docs for those methods need a note indicating that "If you can take the (small?) memory hit, 
> use Masked Arrays instead".   Now that I know different... I'm  going to drop it unless you 
> reall want to dig into it.


I'm curious. Can you post an excerpt of your array, so that I can check what goes wrong?



More information about the NumPy-Discussion mailing list