From 88233d599ef4b1e540ba68d8da6c03d35f519610 Mon Sep 17 00:00:00 2001 From: Junya Otsuki Date: Tue, 23 Apr 2024 15:25:19 +0900 Subject: [PATCH] fix a bug --- src/dcore/interaction.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dcore/interaction.py b/src/dcore/interaction.py index ace6cc3b..782c2c8d 100644 --- a/src/dcore/interaction.py +++ b/src/dcore/interaction.py @@ -418,7 +418,7 @@ def _generate_umat_file(p: Dict): try: if os.path.splitext(file)[1] == ".npy": umat = numpy.load(file) - assert umat.shape == u_shape + assert umat.shape == u_shape, f"inconsistent shape: require {u_shape}, but {umat.shape} is given" else: umat_1d = numpy.loadtxt(file) umat = umat_1d.reshape(u_shape) @@ -433,7 +433,7 @@ def _generate_umat_file(p: Dict): umat_so = to_spin_full_U_matrix(umat) assert umat_so.shape == (2*norb, 2*norb, 2*norb, 2*norb) - u_mat_so_sh.append(umat) + u_mat_so_sh.append(umat_so) return u_mat_so_sh