home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 228295383

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
228295383 MDU6SXNzdWUyMjgyOTUzODM= 1408 .sel does not keep selected coordinate value in case with MultiIndex 6815844 closed 0     8 2017-05-12T13:40:34Z 2022-03-17T17:11:41Z 2022-03-17T17:11:41Z MEMBER      

.sel method usually keeps selected coordinate value as a scalar coordinate

```python In[4] ds1 = xr.Dataset({'foo': (('x',), [1, 2, 3])}, {'x': [1, 2, 3], 'y': 'a'})

Out[4]: <xarray.Dataset> Dimensions: () Coordinates: y <U1 'a' x int64 1 Data variables: foo int64 1 ```

But in MultiIndex case, does not.

python In[5] ds2 = xr.Dataset({'foo': (('x',), [4, 5, 6])}, {'x': [1, 2, 3], 'y': 'b'}) ds = xr.concat([ds1, ds2], dim='y').stack(yx=['y', 'x']) ds.sel(x=2) Out[5] <xarray.Dataset> Dimensions: (y: 2) Coordinates: * y (y) object 'a' 'b' Data variables: foo (y) int64 2 5 x is gone. Is it a desired behavior?

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/1408/reactions",
    "total_count": 3,
    "+1": 3,
    "-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
  • 8 rows from issue in issue_comments
Powered by Datasette · Queries took 0.744ms · About: xarray-datasette