You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia> a =zeros(0,0)
0×0 Array{Float64,2}
julia>sum(a,dims=1)
1×0 Array{Float64,2}
julia>minimum(a,dims=1)
ERROR: ArgumentError: reducing over an empty collection is not allowed
Stacktrace:
[1] _empty_reduce_error() at ./reduce.jl:216
[2] reducedim_init(::Function, ::typeof(min), ::Array{Float64,2}, ::Int64) at ./reducedim.jl:135
[3] _mapreduce_dim at ./reducedim.jl:313 [inlined]
[4] #mapreduce#543 at ./reducedim.jl:304 [inlined]
[5] #mapreduce at ./none:0 [inlined]
[6] _minimum at ./reducedim.jl:675 [inlined]
[7] _minimum at ./reducedim.jl:674 [inlined]
[8] #minimum#551 at ./reducedim.jl:648 [inlined]
[9] (::getfield(Base, Symbol("#kw##minimum")))(::NamedTuple{(:dims,),Tuple{Int64}}, ::typeof(minimum), ::Array{Float64,2}) at ./none:0
[10] top-level scope at REPL[10]:1
Basically it comes down to whether or not Base.reduce_empty(op, eltype(a)) is defined. Is it possible to support this more generally?
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Currently this is a bit inconsistent:
Basically it comes down to whether or not
Base.reduce_empty(op, eltype(a))
is defined. Is it possible to support this more generally?The text was updated successfully, but these errors were encountered: