home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 338445322

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/884#issuecomment-338445322 https://api.github.com/repos/pydata/xarray/issues/884 338445322 MDEyOklzc3VlQ29tbWVudDMzODQ0NTMyMg== 1217238 2017-10-22T02:06:27Z 2017-10-22T02:28:30Z MEMBER

I'm pretty sure now that we should (at least) change iter(ds) and ds.keys() to only include data variables. This is a repeated source of annoyance.

For the most recent example, consider the API for argmin() suggested by @fujiisoup in https://github.com/pydata/xarray/issues/1388#issuecomment-338397633, where argmin() would return a Dataset. We'd like make arr.isel(**arr.argmin(dim)) work, but this requires no additional members (beyond data variables) in arr.argmin(dim).keys().

The question is how to do it: is it worth a deprecation cycle? My proposal: - In v0.10, start issuing FutureWarning when calling ds.__iter__. Suggest that users switch to iterating over .variables instead if they really want everything. (Many cases where every data variable and coordinate is being iterated over should probably already be using the low-level API.) - In v0.11, switch to the new behavior.

Note: __len__ should also be changed in lock-step, to ensure the invariant len(list(ds)) == len(ds).

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