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

cholfact[!] does not respect the uplo character #22187

Closed
fredrikekre opened this issue Jun 2, 2017 · 3 comments
Closed

cholfact[!] does not respect the uplo character #22187

fredrikekre opened this issue Jun 2, 2017 · 3 comments

Comments

@fredrikekre
Copy link
Member

cholfact and cholfact! has an optional uplo input to only consider the upper/lower part of the matrix, but this is not taken into account when checking ishermitian(). For instance:

julia> A = [2. 1.; 0. 2.]
2×2 Array{Float64,2}:
 2.0  1.0
 0.0  2.0

julia> cholfact(A, :U)
ERROR: ArgumentError: matrix is not symmetric/Hermitian. This error can be avoided by calling cholfact(Hermitian(A)) which will ignore either the upper or lower triangle of the matrix.
Stacktrace:
 [1] cholfact(::Array{Float64,2}, ::Symbol) at ./linalg/cholesky.jl:344

This faulty behavior is actually also tested(!).

@fredrikekre
Copy link
Member Author

I will push a fix later.

@andreasnoack
Copy link
Member

This happened in the process of requiring that input is strict Hermitian either by value or Hermitian/Symmetric. I think the right fix is to remove the uplo argument completely. It is simpler only to pass it to the Hermitian/Symmetric constructors.

@fredrikekre
Copy link
Member Author

fredrikekre commented Jun 2, 2017

Yea, that's what I planned.

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

No branches or pull requests

2 participants