home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 239556426

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/964#issuecomment-239556426 https://api.github.com/repos/pydata/xarray/issues/964 239556426 MDEyOklzc3VlQ29tbWVudDIzOTU1NjQyNg== 5635139 2016-08-12T20:50:24Z 2016-08-12T20:50:32Z MEMBER

Thanks for thinking through these

This suggests maybe ds[bool_array] -> da.where(bool_array, drop=True).

I think that makes sense. drop=False would be too confusing

Maybe something like: left_join(da, inner_join(bool_array, other))?

The way I was thinking about it: both other and bool_array need a value for every value in da. So they both need to be subsets. So something like:

``` python assert set(other.dims) =< set(da.dims) assert set(bool_array.dims) =< set(da.dims)

other, _ = xr.broadcast(other, da) bool_array, _ = xr.broadcast(bool_array, da)

da.where(bool_array, other) ```

Is that consistent with the joins you were thinking of?

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