File "...\pyqtgraph\functions.py", line 549, in colorDistance
if len(colors) < 1: return np.array([], dtype=np.float)
File "...\numpy\__init__.py", line 305, in __getattr__
raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Short description
Calling
pg.functions.colorDistance([])raises an error when using numpy >= 1.20, becausenp.floatis deprecated, see https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations.Code to reproduce
Expected behavior
return an empty array
Real behavior
Tested environment(s)
python -m pip install numpy scipy pyside6 -e .Additional context