-
Notifications
You must be signed in to change notification settings - Fork 132
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
Fix for issue #734 #735
Fix for issue #734 #735
Conversation
… reindex on an axis with duplicate labels'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR @kevin-duclos. I haven't worked with pandas for a while so I am not sure why this error is happening. But looking at the code, I think it might be a fix for your specific issue, but in general, the code should work for inputs without the "particle"
column too. This is not reflected by the unittests however (they all use inputs with the "particle" column).
Maybe @nkeim can comment on the specific intended usage of this function?
Thanks @kevin-duclos . The error in #734 makes sense, except it should occur any time that there are many particles, including in the trackpy tests. So I'm confused. I made changes to |
OK, I think this is ready to merge. In addition to the fix by @kevin-duclos , we now include two tests with no
I think this is ready to merge. @caspervdw does this address your question? @kevin-duclos do you think this still fixes the bug? |
Just bumping this issue, especially for @kevin-duclos : Is this OK to merge? |
All good with me, @nkeim. Thanks! |
After the 0.6.2 update, the dataframe processed by subtract_drift() poses an issue for imsd() due to the presence of "particle" in both row and column indices. To address this, it needs to use dataframe.reset_index(drop=True) before running the function to ensure proper execution. |
Change traj.set_index call to avoid Pandas error: 'ValueError: cannot reindex on an axis with duplicate labels'.