diff --git a/base/reducedim.jl b/base/reducedim.jl index 101568d60002b..c1c58ccdfefed 100644 --- a/base/reducedim.jl +++ b/base/reducedim.jl @@ -525,6 +525,8 @@ sum(f, A::AbstractArray; dims) sum!(r, A) Sum elements of `A` over the singleton dimensions of `r`, and write results to `r`. +Note that since the sum! function is intended to operate without making any allocations, +the target should not alias with the source. # Examples ```jldoctest