We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import numpy as np import xarray as xr import xoak shape = (100, 100) lat = np.random.uniform(-90, 90, size=shape) lon = np.random.uniform(-180, 180, size=shape) field = lat + lon ds_mesh = xr.Dataset( coords={'lat': (('x', 'y'), lat), 'lon': (('x', 'y'), lon)}, data_vars={'field': (('x', 'y'), field)}, ).expand_dims(z=10) ds_mesh.xoak.set_index(("lat", "lon"), "scipy_kdtree")
This does not work
ds_mesh.xoak.sel(lat=50, lon=50)
This workaround does what I want:
tempdim = "__xoak_points__" ds_mesh.xoak.sel( lon=xr.Variable(tempdim, [50]), lat=xr.Variable(tempdim, [50]) ).squeeze(tempdim)
Would you be open to adding this workaround?
The text was updated successfully, but these errors were encountered:
Sorry for the late reply @dcherian!
Yes, I think it would be nice to support selection of a single point with something more convenient than the workaround you've shown.
Sorry, something went wrong.
No branches or pull requests
This does not work
This workaround does what I want:
Would you be open to adding this workaround?
The text was updated successfully, but these errors were encountered: