home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 542223429

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/3399#issuecomment-542223429 https://api.github.com/repos/pydata/xarray/issues/3399 542223429 MDEyOklzc3VlQ29tbWVudDU0MjIyMzQyOQ== 10050469 2019-10-15T13:53:27Z 2019-10-15T13:53:27Z MEMBER

Hi, the docs is here: http://xarray.pydata.org/en/stable/indexing.html#more-advanced-indexing

So your example would read:

```python import numpy as np import xarray as xr da = xr.DataArray(np.arange(16).reshape((4,4)), coords=[('lat', [40,45,50,55]), ('lon', [5,10,15,20])])

points = da.sel(lat=xr.DataArray([40.1, 42.3, 39.78], dims='z'), lon=xr.DataArray([7.1, 6.2, 13.2], dims='z'), method='nearest') ```

Arguably, the "more advanced indexing" title could be renamed to something more explicit.

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