On 2/6/23 13:41, Matti Picus wrote:
On 2/6/23 13:09, Ronald van Elburg wrote:
Mean_var, mean_std and tests are now ready.
(https://github.com/soundappraisal/numpy/tree/stdmean-dev-001)
Some decisions made during implementation:
- the output shape of mean follows the output shape of the
variance or the standard deviation. So it responds in the same way to
the keepdims flag as the variance and the standard deviation.
- the resizing of the mean is placed in _mean_var the overhead on
the old functions std and var is minimal as they set mean_out to None.
- the intermediate mean used can not be replaced with the mean
produced by _mean as the output of the latter can not be broadcast to
the incoming data.
_______________________________________________
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: matti.pi...@gmail.com
For a previous discussion of a performant solution, see
https://github.com/numpy/numpy/issues/13199. That issue is more about
var but also touches on a paper that has a two-pass solution for
calculating mean and var together
Matti
Ahh, I see that issue is mentioned in your issue
https://github.com/numpy/numpy/issues/23741
Matti
_______________________________________________
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com