From 394b8d717ab5f772d76c6cc2a9622ae3693f97aa Mon Sep 17 00:00:00 2001 From: Nathan Keim Date: Thu, 30 May 2024 13:04:24 -0400 Subject: [PATCH] WIP: Test fix by @hz-xiaxz --- trackpy/motion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trackpy/motion.py b/trackpy/motion.py index 8b4ee8f5..7432cad8 100644 --- a/trackpy/motion.py +++ b/trackpy/motion.py @@ -239,7 +239,7 @@ def emsd(traj, mpp, fps, max_lagtime=100, detail=False, pos_columns=None): if not detail: return results.set_index('lagt')['msd'] # correctly compute the effective number of independent measurements - results['N'] = msds['N'].sum(level=1) + results['N'] = msds['N'].groupby(level=1).sum() return results