From 978092fc77bad81d94d814879dc813b8eb7be6fe Mon Sep 17 00:00:00 2001 From: azaiche Date: Tue, 23 Jul 2024 13:32:16 -0400 Subject: [PATCH] Bug with pandas pivot fixed --- exatomic/core/orbital.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exatomic/core/orbital.py b/exatomic/core/orbital.py index 6af7540c..690ea1d2 100644 --- a/exatomic/core/orbital.py +++ b/exatomic/core/orbital.py @@ -384,7 +384,7 @@ def square(self, frame=0, column='coef', mocoefs=None, irrep=None): nchi = (irreps.chi.max() + 1).sum() cmat = np.zeros((nchi, norb)) for irrep, grp in irreps: - piv = grp.pivot('chi', 'orbital', mocoefs) + piv = grp.pivot_table(index='chi', columns='orbital', values=mocoefs) ii, jj = piv.shape cmat[i : i + ii, j : j + jj] = piv.values i += ii