Dependence on old Numpy version
Closed this issue · 2 comments
tjk584 commented
BUG
When installing pydarnio borealis_v0.7 branch using pip
, the latest version of numpy is installed (v2.0). However, parts of the code are dependent on deprecated types within numpy, and don't work with v2.0 of numpy.
Priority
- Minor - typo, incorrect naming, fails on specific uncommon situation
- Major - misrepresentation of data, failure in a common situation
- Urgent - failure in usage, large misrepresentation
Example of the bug
When using borealis_restructure.py
within the borealis_v0.7 branch (with numpy v2.0 installed), the following error is thrown:
File "/home/radar/pyDARNio/pydarnio/borealis/borealis_formats.py", line 206, in all_array_types
"antenna_arrays_order": np.unicode_,
^^^^^^^^^^^
File "/home/radar/pydarnio-env/lib64/python3.11/site-packages/numpy/__init__.py", line 397, in __getattr__
raise AttributeError(
AttributeError: `np.unicode_` was removed in the NumPy 2.0 release. Use `np.str_` instead.
Attempts
Manually installing numpy version older than v2.0 fixes the problem.
Potential Solution(s)
- Specify the version of numpy that pip installs when installing pydarnio via pip
- Make pydarnio work with the latest version of numpy
carleyjmartin commented
This is fixed in the release Rem has made.
Also #71
RemingtonRohel commented
If you install the release branch release/v1.3
and it works for you, please leave a review on that PR