Skip to content

Commit

Permalink
Improve error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Hale committed Jul 2, 2024
1 parent 2cd0b4d commit 46d31aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sgw_tools/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def _estimate_lmin(G, maxiter):
# single vertex has eigenvalue zero
return np.nan

assert lmin >= 0, "Smallest eigenvalue is negative {}".format(lmin)
assert lmin >= 0, "Second eigenvalue is negative {}".format(lmin)
if np.isclose(lmin, 0):
raise ValueError("Second eigenvalue is (close to) zero: {}".format(lmin))
return lmin
Expand Down

0 comments on commit 46d31aa

Please sign in to comment.