Deprecate cumsum, cumprod, cumsum_kbn, and accumulate when dim isn't specified#24684
Deprecate cumsum, cumprod, cumsum_kbn, and accumulate when dim isn't specified#24684andreasnoack merged 5 commits intomasterfrom
Conversation
|
Rebase? |
|
|
||
| """ | ||
| cumsum(A, dim=1) | ||
| cumsum(A, dim) |
There was a problem hiding this comment.
AFAICT there should be a separate docstring for AbstractVector, right? Also, ::Integer would be useful since there's no longer any indication of the expected type in the signature.
e8d02ea to
5ff1bad
Compare
|
|
||
| """ | ||
| cumsum(A, dim) | ||
| cumsum(A, axis::Integer) |
There was a problem hiding this comment.
I'd rather keep dim or use region, which are the two terms that appear to be common in similar functions.
There was a problem hiding this comment.
This is what the method uses. They used to be out of sync. However, since we have reducedim, it is probably better to use dim here as well. I'll update.
| accumulate!(op, B, A, dim::Integer) | ||
|
|
||
| Cumulative operation `op` on `A` along the axis `axis`, storing the result in `B`. | ||
| Cumulative operation `op` on `A` along the dimensions `dim`, storing the result in `B`. |
473479a to
92dfc4d
Compare
nalimilan
left a comment
There was a problem hiding this comment.
LGTM apart from the singular/plural issue with "dimensions" in several places.
Should be fixed now. |
specified and dimension is larger than one
Fix bug in accumulate when initial value is provided since the implementation doesn't support multidimentional arrays. Move the accumulate methods with initial values to the end
92dfc4d to
128f7c9
Compare
...and dimension is larger than one
Fixes #19451