Skip to content

Multiplication with HessenbergQ broken for empty matrices #1292

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

Open
andreasnoack opened this issue Apr 18, 2025 · 0 comments
Open

Multiplication with HessenbergQ broken for empty matrices #1292

andreasnoack opened this issue Apr 18, 2025 · 0 comments

Comments

@andreasnoack
Copy link
Member

Indeed, this is a corner case but there is no reason for it to error (it works in GenericLinearAlgebra, i.e. for non-BLAS eltypes).

julia> ones(2, 0)*LinearAlgebra.hessenberg(zeros(0,0)).Q
ERROR: DimensionMismatch: tau has length 0, needs -1
Stacktrace:
 [1] ormhr!(side::Char, trans::Char, ilo::Int64, ihi::Int64, A::Matrix{Float64}, tau::Vector{Float64}, C::Matrix{Float64})
   @ LinearAlgebra.LAPACK ~/.julia/juliaup/julia-1.11.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/LinearAlgebra/src/lapack.jl:6131
 [2] mul!(C::Matrix{Float64}, A::Matrix{Float64}, Q::LinearAlgebra.HessenbergQ{Float64, Matrix{…}, Vector{…}, false})
   @ LinearAlgebra ~/.julia/juliaup/julia-1.11.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/LinearAlgebra/src/abstractq.jl:0
 [3] *(A::Matrix{Float64}, Q::LinearAlgebra.HessenbergQ{Float64, Matrix{Float64}, Vector{Float64}, false})
   @ LinearAlgebra ~/.julia/juliaup/julia-1.11.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/LinearAlgebra/src/abstractq.jl:204
 [4] top-level scope
   @ REPL[228]:1
Some type information was truncated. Use `show(err)` to see complete types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant