Skip to content

Conversation

@Antipath1
Copy link

As requested in #33599 . This adds a shorthand for cumsum!(A; dims) and cumprod!(A;dims), which are equivalent to cumsum!(A, A; dims) and cumprod!(A, A;dims).
I checked that the called accumulate functions accumulate_pairwise!, _accumulate!, _accumulaten!, and _accumulate1! read each element before writing to it so that the case cumsum!(B, A; dims) B===A is alias-safe for sum and product.
This also adds changes to the docstrings and adds tests that check the new single-argument methods.

…t cumsum!(v,v) = cumsum!(v) and appropriate tests and documentation changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants