xoak icon indicating copy to clipboard operation
xoak copied to clipboard

Return distance to the nearest neighbor in query results

Open benbovy opened this issue 5 years ago • 0 comments

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 avatar Dec 15 '20 08:12 benbovy