home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 1352445128

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
1352445128 I_kwDOAMm_X85QnKzI 6957 import xarray fails with numpy 1.20.x 32060225 closed 0     2 2022-08-26T15:52:07Z 2022-08-26T16:37:09Z 2022-08-26T16:37:08Z NONE      

What happened?

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 did you expect to happen?

Successful import of xarray

Minimal Complete Verifiable Example

Python python -m venv test source test/bin/activate pip install numpy==1.20.0 pip install xarray==2022.06.0 python -c "import xarray"

MVCE confirmation

  • [X] Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
  • [X] Complete example — the example is self-contained, including all data and the text of any traceback.
  • [ ] Verifiable example — the example copy & pastes into an IPython prompt or Binder notebook, returning the result.
  • [ ] New issue — a search of GitHub Issues suggests this is not a duplicate.

Relevant log output

No response

Anything else we need to know?

No response

Environment

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/6957/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 1 row from issues_id in issues_labels
  • 2 rows from issue in issue_comments
Powered by Datasette · Queries took 1197.168ms · About: xarray-datasette