[Numpy-discussion] finishing ticket #1035
Charles R Harris
Tue Jan 5 11:20:24 CST 2010
I'm looking at ticket
eye to bringing it to completion but there some issues that need
discussion. Currently there are three ways in which nans can be compared:
maximum/minimum, fmax/fmin, or the new sort order. The maximum/minimum
ufuncs propagate nans, i.e., they will always return a nan if one is
present. The fmax/fmin ufuncs don't propagate nans, they ignore nans when
possible. The new sort order sorts nans to the end, i.e., nans are treated
as larger than any non-nan number; at present there are no ufuncs that
correspond to the sort order. The issues I think need resolving are:
1) Should there be ufuncs corresponding to the sort order?
2) What should a.max(), a.argmax(), a.min(), and a.argmin() do?
I note that a.argmax() is not consistent with a.max() at the moment:
In : a
Out: array([ 0., 1., 2., 3., NaN, 5., 6., 7., NaN, NaN])
In : a.argmax()
In : a.max()
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion