Skip to content
New issue

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

Return distance to the nearest neighbor in query results #26

Open
benbovy opened this issue Dec 15, 2020 · 0 comments
Open

Return distance to the nearest neighbor in query results #26

benbovy opened this issue Dec 15, 2020 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@benbovy
Copy link
Member

benbovy commented Dec 15, 2020

This has been suggested in #11 and might be useful for further processing.

The API could look like this:

ds_sel = ds.xoak.sel(..., distances=None)

where distances may also accept a string that would then correspond to the name of a new data variable in ds_sel holding distance values.

Alternatively, we could add another method to the accessor if we want to keep xarray.Dataset.xoak.sel() close to the original xarray.Dataset.sel().

@benbovy benbovy added the enhancement New feature or request label Dec 15, 2020
@benbovy benbovy added this to the 0.2.0 milestone Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant