You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After installing xarray version 2022.6.0 (currently the latest one) via pip install xarray:
$ python -c "import xarray; print(xarray.__version__)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/packages/xarray/xa/lib/python3.9/site-packages/xarray/__init__.py", line 1, in <module>
from . import testing, tutorial
File "/packages/xarray/xa/lib/python3.9/site-packages/xarray/testing.py", line 9, in <module>
from xarray.core import duck_array_ops, formatting, utils
File "/packages/xarray/xa/lib/python3.9/site-packages/xarray/core/duck_array_ops.py", line 26, in <module>
from . import dask_array_compat, dask_array_ops, dtypes, npcompat, nputils
File "/packages/xarray/xa/lib/python3.9/site-packages/xarray/core/npcompat.py", line 72, in <module>
_SupportsDType[np.dtype],
File "/x86_64/anaconda/3/2021.11/lib/python3.9/typing.py", line 275, in inner
return func(*args, **kwds)
File "/x86_64/anaconda/3/2021.11/lib/python3.9/typing.py", line 999, in __class_getitem__
_check_generic(cls, params, len(cls.__parameters__))
File "/x86_64/anaconda/3/2021.11/lib/python3.9/typing.py", line 209, in _check_generic
raise TypeError(f"{cls} is not a generic class")
TypeError: <class 'numpy.typing._dtype_like._SupportsDType'> is not a generic class
My environment includes numpy 1.20.3 which satisfies the minimal requirements in setup.cfg. On the other hand, updating it to version 1.21.0 or downgrading it to 1.19.0 solves the problem.
What happened?
After installing xarray version 2022.6.0 (currently the latest one) via
pip install xarray
:My environment includes numpy 1.20.3 which satisfies the minimal requirements in setup.cfg. On the other hand, updating it to version 1.21.0 or downgrading it to 1.19.0 solves the problem.
What did you expect to happen?
Successful import of xarray
Minimal Complete Verifiable Example
MVCE confirmation
Relevant log output
No response
Anything else we need to know?
No response
Environment
The text was updated successfully, but these errors were encountered: