Skip to content

Commit acec604

Browse files
authored
Update sumindex.jl
JuliaLang/julia#22825 will change the behavior of `mapreduce` to never promote, so to retain the previous behavior it must be changed to `sum`.
1 parent cb1b377 commit acec604

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/array/sumindex.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ end
193193

194194
function setup_mapr_access(A)
195195
z = zero(eltype(A))
196-
zz = mapreduce(z -> z*z, +, [z]) # z = z*z, with any promotion from mapreduce
196+
zz = sum(z -> z * z, [z]) # z = z*z, with any promotion from sum
197197
n = minimum(size(A))
198198
B = Vector{typeof(zz)}(n)
199199
B, zz, n

0 commit comments

Comments
 (0)