Skip to content
Snippets Groups Projects
Commit 232b6f34 authored by Christoph Groth's avatar Christoph Groth
Browse files

bugfix: do not fail when the Hamiltonian has no non-zero entries

parent be9e81b4
No related branches found
No related tags found
No related merge requests found
......@@ -148,7 +148,7 @@ class SparseSolver(object):
lhs = lhs - energy * sp.identity(lhs.shape[0], format=self.lhsformat)
num_orb = lhs.shape[0]
if check_hermiticity:
if check_hermiticity and len(lhs.data):
rtol = 1e-13
atol = 1e-300
tol = rtol * np.max(np.abs(lhs.data)) + atol
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment