home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 212289815

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/835#issuecomment-212289815 https://api.github.com/repos/pydata/xarray/issues/835 212289815 MDEyOklzc3VlQ29tbWVudDIxMjI4OTgxNQ== 1217238 2016-04-20T07:07:30Z 2016-04-20T07:10:05Z MEMBER

I'm currently in the process of refactoring the merge code so this should be pretty easy to add in.

A few snippets that should come in handy:

``` python def combine_first(arrays): notnulls = [ops.notnull(array) for array in arrays] first_notnull = ops.argmax(ops.stack(notnulls), axis=0) return ops.choose(first_notnull, arrays)

def combine_if_equal(arrays): combined = combine_first(arrays) combined_null = ops.isnull(combined) if not all(((combined == array) | combined_null).all() for array in arrays): raise ValueError return combined ```

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