home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 790878651

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/4995#issuecomment-790878651 https://api.github.com/repos/pydata/xarray/issues/4995 790878651 MDEyOklzc3VlQ29tbWVudDc5MDg3ODY1MQ== 2448579 2021-03-04T19:40:29Z 2021-03-04T19:40:29Z MEMBER

```

ds.sel(lat=[5,15,40], method="nearest", tolerance=5) <xarray.DataArray (lat: 2)> array([1, 2]) Coordinates: * lat (lat) int64 10 20 ```

This is a very surprising result, you've asked for values at three points but received two back.

The following (specifying fill_value) seems like better behaviour to me but how do you choose the coordinate label (here I picked 40 since that was provided to sel) ```

ds.sel(lat=[5,15,40], method="nearest", tolerance=5, fill_value=-999) <xarray.DataArray (lat: 2)> array([1, 2, -999]) Coordinates: * lat (lat) int64 10 20 40 ```

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