Skip to content

Commit

Permalink
fix error in last iteration of ldl
Browse files Browse the repository at this point in the history
  • Loading branch information
ces42 committed Jul 30, 2019
1 parent d4b9cb7 commit 7d6aec2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uncertainties/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def ldl(A):

a = A[i, i]
l = A[i+1:, i]
if a < -EPS or (a <= 0 and abs(l).max() >= EPS):
if a < -EPS or (a <= 0 and len(l) > 0 and abs(l).max() >= EPS):
raise numpy.linalg.LinAlgError('matrix must be positive '
'semidefinite (failed on %s-th diagonal entry)' % i)

Expand Down

0 comments on commit 7d6aec2

Please sign in to comment.