home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 329366409

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/pull/1473#issuecomment-329366409 https://api.github.com/repos/pydata/xarray/issues/1473 329366409 MDEyOklzc3VlQ29tbWVudDMyOTM2NjQwOQ== 1217238 2017-09-14T04:16:22Z 2017-09-14T04:16:22Z MEMBER

It occurs to me now that we actually have an pre-existing merge feature (priority_vars) that allows us to handle merges with some variables taking precedence. This feature is currently used for cases like ds.coords['x'] = data_array when data_array already has a (potentially conflicting) coordinate 'x'.

The rule we could use would be: - For .sel()/.loc[], indexed coordinates from the indexed object take precedence in the result ([obj.coords[k] for k in kwargs] for obj.sel(**kwargs)). Conflicts with indexed coordinates on indexing objects are silently ignored. - For reindex(), indexing coordinates take precedence in the result ([kwargs[k] for k in kwargs] for obj.reindex(**kwargs)). Conflicts with indexed coordinates on the indexed object are silently ignored. - For isel()/[], neither set of indexed coordinates take precedence.

Which we would use with normal rule for dimension/non-dimension coordinates: - Conflicts between dimension coordinates (except for precedence) result in an error. - Conflicts between non-dimension coordinates result in silently dropping the conflicting variable.

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