Skip to content

Commit

Permalink
small fix in invsymsingcheck()
Browse files Browse the repository at this point in the history
  • Loading branch information
droodman committed Feb 15, 2022
1 parent 4106dc4 commit e5536f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function invsym(X) # inverse of symmetric matrix
Symmetric(X)
end
function invsymsingcheck(X) # inverse of symmetric matrix, checking for singularity
iszero(nrows(X)) && (return Symmetric(X))
iszero(nrows(X)) && (return (false, Symmetric(X)))
X, ipiv, info = LinearAlgebra.LAPACK.sytrf!('U', Matrix(X))
singular = info>0
!singular && LinearAlgebra.LAPACK.sytri!('U', X, ipiv)
Expand Down

0 comments on commit e5536f3

Please sign in to comment.