[Numpy-discussion] Faster NaN functions

Erik Rigtorp erik at rigtorp.com
Fri Dec 31 08:52:53 EST 2010


I just send a pull request for some faster NaN functions,

I implemented the following generalized ufuncs: nansum(), nancumsum(),
nanmean(), nanstd() and for fun mean() and std(). It turns out that
the generalized ufunc mean() and std() is faster than the current
numpy functions. I'm also going to add nanprod(), nancumprod(),
nanmax(), nanmin(), nanargmax(), nanargmin().

The current implementation is not optimized in any way and there are
probably some speedups possible.

I hope we can get this into numpy 2.0, me and people around me seems
to have a need for these functions.


More information about the NumPy-Discussion mailing list