home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 242235696

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/742#issuecomment-242235696 https://api.github.com/repos/pydata/xarray/issues/742 242235696 MDEyOklzc3VlQ29tbWVudDI0MjIzNTY5Ng== 8982598 2016-08-24T23:05:49Z 2016-08-24T23:05:49Z CONTRIBUTOR

@shoyer My 2 cents for how this might work after 0.8+ (auto-align during concat, merge and auto_combine goes a long to solving this already) is that the compat option of merge etc could have a 4th option 'nonnull_equals' (or better named...), with compatibility tested by e.g.

``` python import xarray.ufuncs as xrufuncs

def nonnull_compatible(first, second): """ Check whether two (aligned) datasets have any conflicting non-null values. """

# mask for where both objects are not null
both_not_null = xrufuncs.logical_not(first.isnull() | second.isnull())

# check remaining values are equal
return first.where(both_not_null).equals(second.where(both_not_null))

```

And then fillna to combine variables. Looking now I think this is very similar to what you are suggesting in #835.

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