-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Open
Labels
arrays[a, r, r, a, y, s][a, r, r, a, y, s]foldsum, maximum, reduce, foldl, etc.sum, maximum, reduce, foldl, etc.
Description
julia> add(a, b) = a+b
add (generic function with 1 method)
julia> reduce(add, rand(5,5), dims = (1, 2))
ERROR: MethodError: no method matching reducedim_init(::typeof(identity), ::typeof(add), ::Array{Float64,2}, ::Tuple{Int64,Int64})
It seems like Julia should just do something sensible and generic here, like map
does already – is there a specific reason not too, or is it just unimplemented?
Metadata
Metadata
Assignees
Labels
arrays[a, r, r, a, y, s][a, r, r, a, y, s]foldsum, maximum, reduce, foldl, etc.sum, maximum, reduce, foldl, etc.