JuliaLang/julia

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

Open

#33,599 创建于 2019年10月17日

在 GitHub 查看
 (0 评论) (13 反应) (0 负责人)Julia (5,773 fork)batch import
featuregood first issue

仓库指标

Star
 (48,709 star)
PR 合并指标
 (平均合并 20天 6小时) (30 天内合并 157 个 PR)

描述

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.

贡献者指南