Skip to content
Snippets Groups Projects
Commit eca1adcc authored by Joseph Weston's avatar Joseph Weston
Browse files

remove unneeded numpy output storage

The 'out' parameter is only used when you don't want numpy to
allocate a new array for the result, which is not the case here.
parent 3a8807c0
No related branches found
No related tags found
No related merge requests found
......@@ -139,8 +139,7 @@ class Bands:
if derivative_order >= 2: # compute curvatures
# ediff_{i,j} = 1 / (E_i - E_j) if i != j, else 0
ediff = energies.reshape((-1, 1)) - energies.reshape((1, -1))
ediff = np.divide(1, ediff, out=np.zeros_like(ediff),
where=(ediff != 0))
ediff = np.divide(1, ediff, where=(ediff != 0))
h2 = - (mat + mat.conjugate().transpose())
curvatures = np.sum(eigenvectors.conjugate() * (h2 @ eigenvectors)
- 2 * ediff * np.abs(ph1p)**2, axis=0).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