-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in trackpy.emsd() function: TypeError: mean() got an unexpected keyword argument 'level' #757
Comments
Can you post the full trace ? |
Due to changes in pandas version 2.0 and later, df.sum(level=1) is replaced by df.groupby(level=1).sum(), causing the emsd() function to be unavailable. I hope the author can update it as soon as possible. |
Full trace:
Pandas version: 2.1.4 |
Just found this issue is duplicated with #750 |
Closed for good (hopefully) by #758 |
I encountered an error while using the trackpy.emsd() function in the trackpy library. When calling trackpy.emsd() with my trajectory data;
em = tp.emsd(tm, 100/117., 20)
I received the following error:
TypeError: mean() got an unexpected keyword argument 'level'
Steps to Reproduce:
Execute the walkthrough tutorial with own Tif file
Call the trackpy.emsd() function with the trajectory data.
Expected Behavior:
I expected the trackpy.emsd() function to compute the ensemble mean squared displacement (EMSD) without encountering any errors.
Actual Behavior:
Instead, I received a TypeError indicating that the mean() function received an unexpected keyword argument 'level'.
Additional Information:
Version of trackpy library: 0.6.2
Operating System: MacOS Sonoma 14.2.1 with Apple M2 chip
Python version: 3.11.5
The text was updated successfully, but these errors were encountered: