soft-matter / trackpy

Python particle tracking toolkit
http://soft-matter.github.io/trackpy
Other
443 stars 131 forks source link

warning ("...is deprecated and will be removed in a future version") #677

Open rodrigo-j-goncalves opened 3 years ago

rodrigo-j-goncalves commented 3 years ago

Just in case it's relevant, I thought I'd mention the follwoing.

Today I had to reinstall everything (Anaconda, environments and trackpy) from scratch. To be sure it works, I just run the "walkthrough" jupyter notebook. In line 35 I get the following warning:

/home/user00/anaconda3/envs/softmatter/lib/python3.7/site-packages/trackpy/motion.py:235: FutureWarning: Using the level keyword in DataFrame and Series aggregations is deprecated and will be removed in a future version. Use groupby instead. df.median(level=1) should use df.groupby(level=1).median(). results = msds.mul(msds['N'], axis=0).mean(level=1) # weighted average /home/user00/anaconda3/envs/softmatter/lib/python3.7/site-packages/trackpy/motion.py:236: FutureWarning: Using the level keyword in DataFrame and Series aggregations is deprecated and will be removed in a future version. Use groupby instead. df.median(level=1) should use df.groupby(level=1).median(). results = results.div(msds['N'].mean(level=1), axis=0) # weights normalized

Here's the screen capture:

warning