pnumpy icon indicating copy to clipboard operation
pnumpy copied to clipboard

min,max,nanmin,nanmax,argmin,etc. are not ufuncs

Open tdimitri opened this issue 4 years ago • 1 comments

This class of functions would benefit from being hookable in numpy.

tdimitri avatar Oct 01 '20 18:10 tdimitri

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.

teoliphant avatar Oct 08 '20 05:10 teoliphant