Incompatiability with numpy 1.24.0
Closed this issue · 1 comments
ljlamarche commented
BUG
Import fails upon new installation of pydarn in a clean environment. This appears to be due to an incompatibility with the latest version of numpy (1.24.0).
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
Information
python version: 3.10.8
OS: MacOS 12.6.1
matplotlib version:
Example of the bug
>>> import pydarn
/Users/e30737/miniconda3/envs/pydarn_test/lib/python3.10/site-packages/pydarnio/utils/conversions.py:42: FutureWarning: In the future `np.str` will be defined as the corresponding NumPy scalar. (This may have returned Python scalars in past versions.
np.str: 's',
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/e30737/miniconda3/envs/pydarn_test/lib/python3.10/site-packages/pydarn/__init__.py", line 27, in <module>
from .io.superdarn_io import SuperDARNRead
File "/Users/e30737/miniconda3/envs/pydarn_test/lib/python3.10/site-packages/pydarn/io/superdarn_io.py", line 5, in <module>
import pydarnio
File "/Users/e30737/miniconda3/envs/pydarn_test/lib/python3.10/site-packages/pydarnio/__init__.py", line 29, in <module>
from .utils.conversions import dict2dmap
File "/Users/e30737/miniconda3/envs/pydarn_test/lib/python3.10/site-packages/pydarnio/utils/conversions.py", line 42, in <module>
np.str: 's',
File "/Users/e30737/miniconda3/envs/pydarn_test/lib/python3.10/site-packages/numpy/__init__.py", line 284, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'str'. Did you mean: 'std'?
Attempts
Manually downgrading numpy to 1.23.0 seems to get around this problem.
Data Location
N/A
Potential Bug Location
Based on error message, potentially pydarnio/utils/conversions.py, line 42
Potential Solution(s)
- Update source code to work with the latest numpy conventions/deprecations
- Pin numpy version for installation to 1.23.0
carleyjmartin commented
Thanks @ljlamarche, this is actually a pyDARNio issue and can be found here: SuperDARN/pyDARNio#54
As it's open over there, I'll close the issue on this repo.