-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjoint times Diagonal times Vector for n = 0 #714
Labels
bug
Something isn't working
Comments
The bug seems to come from 3 argument multiplication: julia> Diagonal(zeros(0))*zeros(0)
0-element Array{Float64,1}
julia> zeros(0)'Diagonal(zeros(0))*zeros(0)
0.0
julia> zeros(0)'*Diagonal(zeros(0))*zeros(0)
ERROR: ArgumentError: reducing over an empty collection is not allowed
Stacktrace:
[1] _empty_reduce_error() at ./reduce.jl:295
[2] mapreduce_empty(::Function, ::Base.BottomRF{typeof(+)}, ::Type{T} where T) at ./reduce.jl:334
[3] reduce_empty(::Base.MappingRF{LinearAlgebra.var"#160#161",Base.BottomRF{typeof(+)}}, ::Type{T} where T) at ./reduce.jl:321
[4] reduce_empty_iter at ./reduce.jl:347 [inlined]
[5] reduce_empty_iter at ./reduce.jl:346 [inlined]
[6] foldl_impl at ./reduce.jl:46 [inlined]
[7] mapfoldl_impl at ./reduce.jl:41 [inlined]
[8] #mapfoldl#189 at ./reduce.jl:157 [inlined]
[9] mapfoldl at ./reduce.jl:157 [inlined]
[10] #mapreduce#193 at ./reduce.jl:283 [inlined]
[11] mapreduce at ./reduce.jl:283 [inlined]
[12] *(::Adjoint{Float64,Array{Float64,1}}, ::Diagonal{Float64,Array{Float64,1}}, ::Array{Float64,1}) at /home/mason/julia/usr/share/julia/stdlib/v1.4/LinearAlgebra/src/diagonal.jl:647
[13] top-level scope at REPL[7]:1
[14] eval(::Module, ::Any) at ./boot.jl:331
[15] eval_user_input(::Any, ::REPL.REPLBackend) at /home/mason/julia/usr/share/julia/stdlib/v1.4/REPL/src/REPL.jl:86
[16] run_backend(::REPL.REPLBackend) at /home/mason/.julia/packages/Revise/Pcs5V/src/Revise.jl:1073
[17] top-level scope at none:0
|
Yes julia> @which zeros(0)'Diagonal(zeros(0))*zeros(0)
*(u::Adjoint{T,#s662} where #s662<:(AbstractArray{T,1} where T) where T, v::AbstractArray{T,1} where T) in LinearAlgebra at /Applications/Julia-1.4.app/Contents/Resources/julia/share/julia/stdlib/v1.4/LinearAlgebra/src/adjtrans.jl:245
julia> @which zeros(0)'*Diagonal(zeros(0))*zeros(0)
*(x::Adjoint{#s662,#s661} where #s661<:(AbstractArray{T,1} where T) where #s662, D::Diagonal, y::AbstractArray{T,1} where T) in LinearAlgebra at /Applications/Julia-1.4.app/Contents/Resources/julia/share/julia/stdlib/v1.4/LinearAlgebra/src/diagonal.jl:647 The |
This was referenced Apr 22, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: