-
-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
JuliaLang/julia
#47074Description
As the title says, I've found that calling eigen on a complex Hermitian matrix with NaNs does not throw an error:
julia> using LinearAlgebra
julia> eigen(Hermitian(fill(complex(NaN), 2, 2)))
Eigen{ComplexF64, Float64, Matrix{ComplexF64}, Vector{Float64}}
values:
2-element Vector{Float64}:
NaN
NaN
vectors:
2×2 Matrix{ComplexF64}:
NaN+0.0im NaN+0.0im
NaN+0.0im NaN+0.0imwhile I see:
julia> eigen(Hermitian(fill(NaN, 2, 2)))
ERROR: ArgumentError: matrix contains Infs or NaNs
[...]
julia> eigen(fill(complex(NaN), 2, 2))
ERROR: ArgumentError: matrix contains Infs or NaNsIt looks like it could be fixed by adding a call to chkuplofinite inside the complex version of syevr!.
This is with:
julia> versioninfo()
Julia Version 1.7.3
Commit 742b9abb4d (2022-05-06 12:58 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Xeon(R) E-2176M CPU @ 2.70GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
Environment:
JULIA_EDITOR = vimbut I've checked on Julia 1.7, 1.8, and 1.9 using both OpenBLAS and MKL.
Related to #406.
Metadata
Metadata
Assignees
Labels
No labels