ENH: Add reverse argument to ufunc.accumulate, cumsum, nancumsum, cumprod, nancumprod
"Carlos Martin" <[email protected]>
| Newsgroups | gmane.comp.python.numeric.general |
|---|---|
| Message-ID | <[email protected]> |
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 -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/numpy-discussion.python.org Member address: [email protected]