Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/lapack.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6135,10 +6135,11 @@
chkside(side)
chktrans(trans)
n = checksquare(A)
ntau = length(tau)
mC, nC = size(C, 1), size(C, 2)

if n - length(tau) != 1
throw(DimensionMismatch(lazy"tau has length $(length(tau)), needs $(n - 1)"))
if max(n - 1, 0) != ntau
throw(DimensionMismatch(lazy"tau has length $ntau, needs $(n - 1)"))

Check warning on line 6142 in src/lapack.jl

View check run for this annotation

Codecov / codecov/patch

src/lapack.jl#L6142

Added line #L6142 was not covered by tests
end
if (side == 'L' && mC != n) || (side == 'R' && nC != n)
throw(DimensionMismatch("A and C matrices are not conformable"))
Expand Down
7 changes: 7 additions & 0 deletions test/hessenberg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -286,4 +286,11 @@ end
end
end

@testset "multiplication with empty HessenbergQ" begin
@test ones(2, 0)*hessenberg(zeros(0,0)).Q == zeros(2,0)
@test_throws DimensionMismatch ones(2, 1)*hessenberg(zeros(0,0)).Q
@test hessenberg(zeros(0,0)).Q * ones(0, 2) == zeros(0,2)
@test_throws DimensionMismatch hessenberg(zeros(0,0)).Q * ones(1, 2)
end

end # module TestHessenberg