home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 335282551

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/issues/1613#issuecomment-335282551 https://api.github.com/repos/pydata/xarray/issues/1613 335282551 MDEyOklzc3VlQ29tbWVudDMzNTI4MjU1MQ== 1217238 2017-10-09T20:48:46Z 2017-10-09T20:48:46Z MEMBER

This was actually intentional, though you are certainly not the first person to complain about this.

Xarray's behavior mirrors pandas. The justification for this logic is that sel/loc would work like normal indexing [] on a Python list, and if you supply slice limits in the opposite order on a Python list, you get an empty result.

Probably the cleanest solution possible would be a separate selection object for xarray that doesn't care about order, e.g., da.sel(x=xarray.Between(10, 50)).

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