-
-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
JuliaLang/julia
#22453Labels
good first issueGood for newcomersGood for newcomers
Description
I'm not super-qualified to suggest a course of action here (or whether it's even a real problem), but it seems worthy of an issue.
If I call eigvals on a NaN-filled Symmetric matrix, it errors:
julia> eigvals(Symmetric(fill(NaN, 5, 5)))[:values]
ERROR: Base.LinAlg.LAPACKException(1)
Stacktrace:
[1] chklapackerror(::Int64) at ./linalg/lapack.jl:34
[2] syevr!(::Char, ::Char, ::Char, ::Array{Float64,2}, ::Float64, ::Float64, ::Int64, ::Int64, ::Float64) at ./linalg/lapack.jl:4855
[3] eigvals! at ./linalg/symmetric.jl:310 [inlined]
[4] eigvals(::Symmetric{Float64,Array{Float64,2}}) at ./linalg/symmetric.jl:312However, if I use eigfact instead of eigvals, it doesn't error. Instead, it returns an empty eigenvalue vector:
julia> eigfact(Symmetric(fill(NaN, 5, 5)))
Base.LinAlg.Eigen{Float64,Float64,Array{Float64,2},Array{Float64,1}}(Float64[], Array{Float64}(5,0))
julia> ans[:values]
0-element Array{Float64,1}I would've expected the above two examples to behave consistently (preferring that both throw an error).
julia> versioninfo()
Julia Version 0.6.0-dev.2899
Commit 61a291b (2017-02-22 04:15 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin13.4.0)
CPU: Intel(R) Core(TM) i5-4288U CPU @ 2.60GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
LAPACK: libopenblas64_
LIBM: libopenlibm
LLVM: libLLVM-3.9.1 (ORCJIT, haswell)Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers