issue_comments: 736755070
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/4630#issuecomment-736755070 | https://api.github.com/repos/pydata/xarray/issues/4630 | 736755070 | MDEyOklzc3VlQ29tbWVudDczNjc1NTA3MA== | 2448579 | 2020-12-01T19:03:12Z | 2020-12-01T19:03:12Z | MEMBER | TO use "vectorized indexing", ``` python import xarray as xr import numpy as np ds = xr.tutorial.open_dataset("air_temperature") Define taget latitude and longitudetgt_lat = xr.DataArray(np.linspace(0, 100, num=10), dims="points") # <--- tgt_lon = xr.DataArray(np.linspace(0, 100, num=10), dims="points") # <--- Retrieve data at target latitude and longitudetgt_data = ds['air'].sel(lon=tgt_lon, lat=tgt_lat, method='nearest') tgt_data ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
753874419 |