JuliaLang/julia

single-argument accumulate!, cumsum!, cumprod!, etc.?

Open

#33,599 opened on Oct 17, 2019

View on GitHub
 (0 comments) (13 reactions) (0 assignees)Julia (5,773 forks)batch import
featuregood first issue

Repository metrics

Stars
 (48,709 stars)
PR merge metrics
 (Avg merge 20d 6h) (157 merged PRs in 30d)

Description

I assumed before reading the docs that cumsum!(v) would accumulate v and store the result in-place, but it was a no method error. Doing cumsum!(v, v) seems to work; is there any reason not to make cumsum!(v) a shorthand for cumsum!(v, v)? Likewise with all accumulators.

Contributor guide