home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 337619718

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
337619718 MDU6SXNzdWUzMzc2MTk3MTg= 2263 [bug] Exception ignored in generator object Variable 1200058 closed 0     9 2018-07-02T18:30:57Z 2019-01-23T00:56:19Z 2019-01-23T00:56:18Z NONE      

X is an xr.DataArray of shape (2000, 100), idx is a np.ndarray vector of shape (500,). Now I'd like to fetch:python X[idx].values ```

Problem description

During this, the following warning pops up: ``` Exception ignored in: <generator object Variable._broadcast_indexes.\<locals>.\<genexpr> at 0x7fcdd479f1a8> Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/xarray/core/variable.py", line 470, in <genexpr> if all(isinstance(k, BASIC_INDEXING_TYPES) for k in key): SystemError: error return without exception set

```

Expected Output

No error

Possible solution:

Each time I execute: all(not isinstance(k, Variable) for k in key) the error pops up at a Tuple Iterator. Changing this to all([not isinstance(k, Variable) for k in key]) solves the problem.

Output of xr.show_versions()

INSTALLED VERSIONS ------------------ commit: None python: 3.6.5.final.0 python-bits: 64 OS: Linux OS-release: 4.15.0-23-generic machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: de_DE.UTF-8 LOCALE: de_DE.UTF-8 xarray: 0.10.7 pandas: 0.23.1 numpy: 1.14.5 scipy: 1.1.0 netCDF4: 1.3.1 h5netcdf: 0.5.1 h5py: 2.8.0 Nio: None zarr: None bottleneck: None cyordereddict: None dask: 0.17.5 distributed: None matplotlib: 2.2.2 cartopy: None seaborn: 0.8.1 setuptools: 39.2.0 pip: 9.0.1 conda: None pytest: None IPython: 6.4.0 sphinx: None
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/2263/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

  • 0 rows from issues_id in issues_labels
  • 9 rows from issue in issue_comments
Powered by Datasette · Queries took 0.721ms · About: xarray-datasette