home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 377316057

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/2028#issuecomment-377316057 https://api.github.com/repos/pydata/xarray/issues/2028 377316057 MDEyOklzc3VlQ29tbWVudDM3NzMxNjA1Nw== 5635139 2018-03-29T17:44:11Z 2018-03-29T17:44:11Z MEMBER

What's the easiest way to select on multiple values? Is it really this:

```python In [63]: da = xr.DataArray(np.random.rand(3,2), dims=list('ab'), coords={'c':(('a',),list('xyz'))})

In [64]: da.sel(a=(np.isin(da.c, list('xy')))) Out[64]: <xarray.DataArray (a: 2, b: 2)> array([[0.383989, 0.174317], [0.698948, 0.815993]]) Coordinates: c (a) <U1 'x' 'y' Dimensions without coordinates: a, b ```

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