Skip to content

Commit 77085ed

Browse files
committed
More bugfixes in set_phonon_coefficients()
1 parent 5c50cb8 commit 77085ed

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/edipack2py/func_aux_funx.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ def set_phonon_coefficients(self, displacement=None, coupling=None):
395395

396396
aux_norb = ct.c_int.in_dll(self.library, "Norb").value
397397

398-
if displacement == None and coupling == None:
398+
if displacement is None and coupling is None:
399399
raise RuntimeError(
400400
"set_phonon_coefficients: provide at least either displacement or coupling"
401401
)
@@ -404,9 +404,9 @@ def set_phonon_coefficients(self, displacement=None, coupling=None):
404404
set_a_ph(np.array([displacement], order="F"))
405405

406406
if coupling is not None:
407-
if np.shape(copuling) == (aux_norb,):
407+
if np.shape(coupling) == (aux_norb,):
408408
coupling = np.array(np.diag(coupling), order="F")
409-
elif np.shape(copuling) != (aux_norb, aux_norb):
409+
elif np.shape(coupling) != (aux_norb, aux_norb):
410410
raise ValueError(
411411
"set_phonon_coefficients: coupling shape is (Norb) or (Norb,Norb)"
412412
)

0 commit comments

Comments
 (0)