home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 456239422

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
456239422 MDU6SXNzdWU0NTYyMzk0MjI= 3022 LazilyOuterIndexedArray doesn't support slicing with slice objects 306380 open 0     2 2019-06-14T13:05:56Z 2019-06-14T21:48:12Z   MEMBER      

Code Sample, a copy-pastable example if possible

python from xarray.core.indexing import LazilyOuterIndexedArray import numpy as np x = LazilyOuterIndexedArray(np.ones((5, 5))) x[:3]

```python-traceback

AttributeError Traceback (most recent call last) <ipython-input-4-42bee9beb30a> in <module> ----> 1 x[:3]

~/workspace/xarray/xarray/core/indexing.py in getitem(self, indexer) 518 array = LazilyVectorizedIndexedArray(self.array, self.key) 519 return array[indexer] --> 520 return type(self)(self.array, self._updated_key(indexer)) 521 522 def setitem(self, key, value):

~/workspace/xarray/xarray/core/indexing.py in _updated_key(self, new_key) 483 484 def _updated_key(self, new_key): --> 485 iter_new_key = iter(expanded_indexer(new_key.tuple, self.ndim)) 486 full_key = [] 487 for size, k in zip(self.array.shape, self.key.tuple):

AttributeError: 'slice' object has no attribute 'tuple' ```

Problem description

Dask array meta computations like to run x[:0, :0] on input arrays. This breaks with this class.

This is on master

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

Links from other tables

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