home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 175390102

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/727#issuecomment-175390102 https://api.github.com/repos/pydata/xarray/issues/727 175390102 MDEyOklzc3VlQ29tbWVudDE3NTM5MDEwMg== 1217238 2016-01-27T04:38:44Z 2016-01-27T05:13:44Z MEMBER

I agree, this can be ambiguous. It makes sense for ordered mappings, but not for normal dicts. And unfortunately there is no Pythonic way to tell whether a mapping is ordered or not.

I originally included it because I wanted to make sure operations like xr.DataArray(2 * x.data, x.coords) preserve all original dimensions in order. But, given that we define DataArray.coords.dims and use that to fill in an empty dims argument, we don't really need this anymore. If someone really likes supplying coordinates as an OrderedDict, it's simple enough for them to write coords.items() instead.

So I would support deprecating supplying dict-like coordinates without explicitly provided dims. It's more magic than we really need. This line is in the relevant code path.

I don't want to simply error when coordinates have ambiguous lengths compared to the size of the data, because adding errors in special cases makes things harder to predict.

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