home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 237783362

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-237783362 https://api.github.com/repos/pydata/xarray/issues/884 237783362 MDEyOklzc3VlQ29tbWVudDIzNzc4MzM2Mg== 1217238 2016-08-05T08:06:32Z 2016-08-05T08:07:22Z MEMBER

What would happen to the actual variables? Would ds['longitude'] also return a KeyError? This would be very far from the NetCDF model and would brake many many things....

There is no way we would change this -- ds['longitude'] will always return the longitude array.

What are your thoughts now?

I like this change for the reasons you outline above, and those I mentioned in the previous issue. I'm somewhat concerned about breaking a lot of user code, and also am not sure yet what the right solution here looks, because of concerns about breaking duck-type compatibility with dictionaries.

Which of these should no longer include coordinates? Can we make things consistent without changing all of them? - iter(ds) (currently we actually define Dataset.keys() implicitly via __iter__) - 'x' in ds - del ds['x'] - ds['x'] (this would be quite a compatibility break, as @fmaussion notes above)

We would also need to encourage users to use the low level Dataset.variables property to check whether something is either a coordinate or data variables.

{
    "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.686ms · About: xarray-datasette