Matthieu Brucher wrote:
> Hi,
>
> I encountered cases where numpy.min() returned nan when the first and 
> the last values were nan. Didn't know of nanmin(), but I'll use them now !
Mmh, interesting. Indeed, a quick test shows that as long as the last 
value of a rank 1 array is not Nan, min ignore nan.

import numpy
a = 0.1 * numpy.arange(10)
numpy.min(a)
a[:9] = numpy.nan
numpy.min(a) # ignore Nan
a = 0.1 * numpy.arange(10)
a[-1] = numpy.nan
numpy.min(a) # Does not ignore Nan

cheers,

David
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to