Add a reverse argument to accumulating functions that, when true, causes the accumulation to be performed in reverse. Examples:
- ufunc.accumulate: https://numpy.org/doc/stable/reference/generated/numpy.ufunc.accumulate.html - cumsum: https://numpy.org/doc/stable/reference/generated/numpy.cumsum.html - nancumsum: https://numpy.org/doc/stable/reference/generated/numpy.nancumsum.html - cumprod: https://numpy.org/doc/stable/reference/generated/numpy.cumprod.html - nancumprod: https://numpy.org/doc/stable/reference/generated/numpy.nancumprod.html Currently, this can be done via two flips (https://numpy.org/doc/stable/reference/generated/numpy.flip.html) before and after the operation. But it might be more efficient to do it directly at the low level. _______________________________________________ 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