soft-matter / trackpy

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

VisibleDeprecationWarning #629

Closed ivanovmg closed 3 years ago

ivanovmg commented 4 years ago

Repro steps

  1. Clone repo, master branch
  2. Run unit tests: python -m unittest trackpy/tests/*.py
  3. Observe multiple instances of deprecation warnings.
VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple
of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated.
If you meant to do this, you must specify 'dtype=object' when creating the ndarray
  r = np.sqrt(np.sum(np.array(coords)**2, axis=0))

System information

Windows 10

Packages installed:

$ python --version
Python 3.8.3

$ pip freeze
certifi==2020.6.20
cycler==0.10.0
kiwisolver==1.2.0
llvmlite==0.34.0
matplotlib==3.3.1
numba==0.51.0
numpy==1.19.1
pandas==1.1.0
Pillow==7.2.0
pyparsing==2.4.7
python-dateutil==2.8.1
pytz==2020.1
PyYAML==5.3.1
scipy==1.5.2
six==1.15.0
-e git+https://github.com/ivanovmg/trackpy.git@cdab60a9d9572bb1e214b69f680dfaf355c370ec#egg=trackpy
tacaswell commented 4 years ago

This is a change in the behavior of in numpy (starting with np.1.19).