Skip to content

Missing method in /(::Adjoint{ComplexF64}, Hessenberg{Float64}) #1019

Closed
JuliaLang/julia
#50671
@martinholters

Description

@martinholters
julia> A = rand(5,5);

julia> b = rand(5);

julia> H = hessenberg(A);

julia> b' / H # adjoint of real vector is ok
1×5 Matrix{Float64}:
 -7.66339  3.09448  7.69176  0.771431  -0.683927

julia> Matrix(complex(b)') / H # complex single-row matrix is ok
1×5 Matrix{ComplexF64}:
 -7.66339+0.0im  3.09448+0.0im  7.69176-0.0im  0.771431+0.0im  -0.683927+0.0im

julia> complex(b)' / H # adjoint of complex vector fails
ERROR: MethodError: no method matching rmul!(::Matrix{ComplexF64}, ::LinearAlgebra.HessenbergQ{Float64, Matrix{Float64}, Vector{Float64}, false})

Is there a good reason why the last call shouldn't give the same result as the one before? (Or maybe even better, an adjoint vector rather than a single-row matrix, also in the real case.)

Noticed while working on #1015 and as a by-product making complex.(b') return an Adjoint (just as broadcast(complex, b') does already) and thus breaking
https://github.com/JuliaLang/julia/blob/958f647d8e2d7d93b9d158f283e0891e8e9cf0b0/stdlib/LinearAlgebra/test/hessenberg.jl#L181

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions