AttributeError exceptions because of numpy.float. Change that to builtin float (or numpy.float64).
I'm getting hundreds of exceptions like below on machines that I myself installed ndscope. ndscope seems to run, but it's annoying.
Traceback (most recent call last):
File "/home/keita/miniconda3/envs/igwn/lib/python3.11/site-packages/ndscope/scope.py", line 1138, in _update_plots
plot.update(data, self.t0)
File "/home/keita/miniconda3/envs/igwn/lib/python3.11/site-packages/ndscope/plot.py", line 453, in update
cc.set_data(cd, t0)
File "/home/keita/miniconda3/envs/igwn/lib/python3.11/site-packages/ndscope/plot.py", line 675, in set_data
y=hold_over_nan(y),
^^^^^^^^^^^^^^^^
File "/home/keita/miniconda3/envs/igwn/lib/python3.11/site-packages/ndscope/plot.py", line 47, in hold_over_nan
out = np.empty_like(y, dtype=np.float)
^^^^^^^^
File "/home/keita/miniconda3/envs/igwn/lib/python3.11/site-packages/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. Did you mean: 'cfloat'?
Reading https://numpy.org/devdocs/release/1.24.0-notes.html, it seems that this should have been a problem since NumPy 1.24. It's NumPy 1.24.2 that produced the errors above.
(igwn) keita@DESKTOP-DPFAA27:~$ conda list numpy
numpy 1.24.2 py311h8e6699e_0 conda-forge
(igwn) keita@DESKTOP-DPFAA27:~$ ndscope --version
ndscope 0.17.0
pygtgraph 0.13.1
nds2-client 0.16.12
In the control room this is not a problem, I see that the numpy version is 1.23.5
keita.kawabe@opslogin0:~$ python
Python 3.9.15 | packaged by conda-forge | (main, Nov 22 2022, 08:45:29)
[GCC 10.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> np.__version__
'1.23.5'
Edited by Keita Kawabe