Hi All,
I'm looking at ticket #1025 with an 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 [9]: a
Out[9]: array([ 0., 1., 2., 3., NaN, 5., 6., 7., NaN, NaN])
In [10]: a.argmax()
Out[10]: 7
In [11]: a.max()
Out[11]: nan
Thoughts?
Chuck