Skip to content

Commit 6b0d58b

Browse files
committed
bugfix in get_denmat
1 parent 65048b8 commit 6b0d58b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/edipack2py/func_io.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,7 +1536,7 @@ def get_denmat(self, ishape=4, doprint=False):
15361536
ed_get_denmat_n2.restype = None
15371537

15381538
ed_get_denmat_n4 = self.library.ed_get_denmat_n4
1539-
ed_get_denmat_n2.argtypes = [
1539+
ed_get_denmat_n4.argtypes = [
15401540
np.ctypeslib.ndpointer(dtype=complex, ndim=4, flags="F_CONTIGUOUS"), # denmat
15411541
np.ctypeslib.ndpointer(dtype=np.int64, ndim=1, flags="F_CONTIGUOUS"), # dimdenmat
15421542
ct.c_int, # doprint
@@ -1563,11 +1563,11 @@ def get_denmat(self, ishape=4, doprint=False):
15631563

15641564
if ishape == 4:
15651565
dimdenmat=np.array([aux_nspin,aux_nspin, Ns, Ns], dtype=int, order="F")
1566-
denmat = np.zeros([aux_nspin, aux_nspin, Ns, Ns], dtype=complex, order="F")
1566+
denmat = np.zeros((aux_nspin, aux_nspin, Ns, Ns), dtype=complex, order="F")
15671567
ed_get_denmat_n4(denmat, dimdenmat, doprint)
15681568
elif ishape == 2:
15691569
dimdenmat=np.array([aux_nspin * Ns, aux_nspin * Ns], dtype=int, order="F")
1570-
denmat = np.zeros([aux_nspin * Ns, aux_nspin * Ns], dtype=complex, order="F")
1570+
denmat = np.zeros((aux_nspin * Ns, aux_nspin * Ns), dtype=complex, order="F")
15711571
ed_get_denmat_n2(denmat, dimdenmat, doprint)
15721572
else:
15731573
raise ValueError("get_denmat: wrong ishape")

0 commit comments

Comments
 (0)