home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 238549129

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/pull/947#issuecomment-238549129 https://api.github.com/repos/pydata/xarray/issues/947 238549129 MDEyOklzc3VlQ29tbWVudDIzODU0OTEyOQ== 4160723 2016-08-09T13:16:50Z 2016-08-09T13:16:50Z MEMBER

It seems like a fine rule to say that you cannot call .sel on both a level and the dimension name at the same time

Agreed. I have always the tendency to want to make things as flexible as possible, but this is definitely not needed here.

I'm currently leaning toward Option 3A, but I don't have a strong opinion.

I'm also +1 for Option 3A. Maybe one little argument in favor of Options 3E or 3F is that they still show a consistent repr when a scalar is returned from the multi-index (see below), even though I don't like how they would display duplicate information.

```

da.sel(level_1='a', level_2=0) <xarray.DataArray 'test' (y: 4)> array([ 0.66068869, 0.20374398, 0.43967166, 0.09447679]) Coordinates: x object ('a', 0) * y (y) int64 0 1 2 3 ```

Possibly it would be a good idea to rename Coordinate -> IndexVariable

As a recent xarray user, I indeed remember that I initially found confusing to have Dataset or DataArray "coordinates" that can be either Coordinate or Variable objects. I find that the name IndexVariable is more representative of the object.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  169588316
Powered by Datasette · Queries took 0.528ms · About: xarray-datasette