pnumpy
pnumpy copied to clipboard
min,max,nanmin,nanmax,argmin,etc. are not ufuncs
This class of functions would benefit from being hookable in numpy.
min and max: reduction on the ufuncs np.minimum and np.maximum. Speeding up those ufuncs should speed up min and max. But, specializing for reduction cases might make sense, too. Perhaps this could be done using an optional over-ride of the reduce method for a particular ufunc instance (i.e. at the ufunc level).
nanmin and nanmax: these are Python functions and could be "monkey-patched" at the Python level.
argmin: having an API added to NumPy to replace PyArray_ArrFuncs would help this function as it is a loose wrapper around the argfunc kernel.