[JuliaLang/LinearAlgebra.jl] ishermitian(::Diagonal) is wrong for non-real matrices (#175)

0 views
Skip to first unread message

Jiahao Chen

unread,
Nov 26, 2024, 6:21:40 AM11/26/24
to JuliaLang/LinearAlgebra.jl, Julia Backports, Mention

Currently ishermitian(::Diagonal) is defined to be true always, but this is wrong when the entries have nonzero nonreal components.

julia> D=Diagonal([Complex(0.0,1.0)])
1x1 Base.LinAlg.Diagonal{Complex{Float64}}:
 0.0+1.0im

julia> ishermitian(D)
true

julia> D'
1x1 Base.LinAlg.Diagonal{Complex{Float64}}:
 0.0-1.0im

julia> D'==D
false


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: <JuliaLang/LinearAlgebra.jl/issues/175@github.com>

Reply all
Reply to author
Forward
0 new messages