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

system.Energies: return a real array

For some weird reason numpy.linalg.eigvalsh returns a complex array!
parent b3be4cc6
No related branches found
No related tags found
No related merge requests found
......@@ -324,4 +324,4 @@ class Energies():
def __call__(self, k):
mat = self.hop * complex(math.cos(k), math.sin(k))
mat += mat.conjugate().transpose() + self.ham
return np.sort(np.linalg.eigvalsh(mat))
return np.sort(np.linalg.eigvalsh(mat).real)
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