[Numpy-discussion] Faster NaN functions

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


Hi,

I just send a pull request for some faster NaN functions,
https://github.com/rigtorp/numpy.

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.

Erik



More information about the NumPy-Discussion mailing list