kwgoodman

Results 28 comments of kwgoodman

Wow! That is amazing. The current version is just: ```python def ss(a, axis=None): "Slow sum of squares used for unaccelerated dtypes." a = np.asarray(a) y = np.multiply(a, a).sum(axis) return y...

Alternatively we could use your version. It currently doesn't handle negative axes.

This seems to work (passes all bottleneck unit tests): ```python def ss(a, axis=None): "Slow sum of squares used for unaccelerated dtypes." a = np.asarray(a) input_subscripts = range(a.ndim) if axis is...

I think the case for changing bn.slow.nansum is weaker than that for bn.slow.ss. For example, many users of nansum will know ahead of time if the array contains nans.

How does the speed of your einsum-based nansum compare to bn.slow.nansum which is just np.nansum?

Good catch. The accumulator is 32-bits but the output is a python float. You can get the same result even when you do specify the axis. The issue is whether...

I think numpy uses a more robust algorithm: https://en.wikipedia.org/wiki/Pairwise_summation. Bottleneck doesn't.

I think numpy uses a more robust algorithm: https://en.wikipedia.org/wiki/Pairwise_summation. Bottleneck doesn't. Is bottleneck used at JPL?!

Happy to hear that bottleneck is used, even if indirectly, at JPL. I'd be interested in trying pairwise summation in bn.nansum and bn.nanmean. I get paid for releases of [numerox](https://github.com/kwgoodman/numerox)...

I am happy to hear that bottleneck has been useful. You made my day. I doubt I will be making your day because I am going to suggest a workaround...