Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In-place cholesky fails for Hermitian with a non-Hermitian parent #1173

Open
jishnub opened this issue Jul 11, 2023 · 0 comments
Open

In-place cholesky fails for Hermitian with a non-Hermitian parent #1173

jishnub opened this issue Jul 11, 2023 · 0 comments

Comments

@jishnub
Copy link
Member

jishnub commented Jul 11, 2023

julia> M = @MMatrix [30 1; 2 30]
2×2 MMatrix{2, 2, Int64, 4} with indices SOneTo(2)×SOneTo(2):
 30   1
  2  30

julia> isposdef(Hermitian(Matrix(M)))
true

julia> cholesky!(Hermitian(M))
ERROR: PosDefException: matrix is not Hermitian; Cholesky factorization failed.
Stacktrace:
 [1] non_hermitian_error()
   @ StaticArrays ~/Dropbox/JuliaPackages/StaticArrays.jl/src/cholesky.jl:2
 [2] #cholesky#532
   @ ~/Dropbox/JuliaPackages/StaticArrays.jl/src/cholesky.jl:4 [inlined]
 [3] cholesky
   @ ~/Dropbox/JuliaPackages/StaticArrays.jl/src/cholesky.jl:3 [inlined]
 [4] _chol!
   @ ~/Dropbox/JuliaPackages/StaticArrays.jl/src/cholesky.jl:11 [inlined]
 [5] cholesky!(A::Hermitian{Int64, MMatrix{2, 2, Int64, 4}}, ::NoPivot; check::Bool)
   @ LinearAlgebra ~/packages/julias/julia-1.9/share/julia/stdlib/v1.9/LinearAlgebra/src/cholesky.jl:267
 [6] cholesky!
   @ ~/packages/julias/julia-1.9/share/julia/stdlib/v1.9/LinearAlgebra/src/cholesky.jl:266 [inlined]
 [7] cholesky!(A::Hermitian{Int64, MMatrix{2, 2, Int64, 4}})
   @ LinearAlgebra ~/packages/julias/julia-1.9/share/julia/stdlib/v1.9/LinearAlgebra/src/cholesky.jl:266
 [8] top-level scope
   @ REPL[24]:1

This should not check if the parent is also hermitian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants