issue_comments: 901594249
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/4118#issuecomment-901594249 | https://api.github.com/repos/pydata/xarray/issues/4118 | 901594249 | IC_kwDOAMm_X841vTyJ | 35968931 | 2021-08-19T04:10:30Z | 2021-08-19T04:10:30Z | MEMBER | I think that xarray's current use of both dict-like access and attribute-like access for variables makes representing a general netCDF file in a single Consider a tree with a node structure for a hypothetical
We ideally want to be able to seamlessly access both subtrees and individual variables via chains of keys, e.g.
This particular example is fine, and would correspond to a netCDF file with groups "root", "root/weather", and "root/weather/temperature", plus the four stored DataArray variables. However, if one of the variables has the same name as one of the groups (which I think is permitted in the netCDF format), then there is no easy way to access all the elements whilst retaining the nice syntax. For example consider
Now we have a key collision between the group named "B" and the DataArray named "B", i.e. We can't just forbid this type of tree because then there would be netCDF files that we couldn't represent as a We can't use different types of access (e.g. (We could divide access through The only way I can see around this is to hide a node's data variables behind a It sounds like @emilbiju avoided this by not satisfying
so I'm wondering if anyone else has other suggestions or thoughts? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
628719058 |