Skip to content

Commit

Permalink
Revert "MAINT: address pandas deprecation warning"
Browse files Browse the repository at this point in the history
This reverts commit dca4e76.
  • Loading branch information
redeboer committed Sep 9, 2023
1 parent 6b9e0b4 commit 5715c8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pawian/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def rho2(self) -> pd.DataFrame:
"""Compute a dataframe containing the square sum of the 3-momenta."""
p3_squared = self.p_xyz**2 # type: ignore[operator]
if self.has_particles:
return p3_squared.T.groupby(level=0).sum()
return p3_squared.groupby(axis=1, level=0).sum()
return p3_squared.sum(axis=1)

@property
Expand Down

0 comments on commit 5715c8d

Please sign in to comment.