Any idea why sum
throws an error when given a StaticArray
? (I’m using Julia 1.5.3)
using StaticArrays
input = @SArray rand(2,2,2);
sum(input, dims=(1,2)) # throws error
Error:
ERROR: LoadError: MethodError: no method matching _mapfoldl(::typeof(identity), ::typeof(+), ::Tuple{Int64,Int64}, ::StaticArrays._InitialValue, ::Size{(2, 2, 2)}, ::SArray{Tuple{2,2,2},Float64,3,8})