xarray.Dataset.xoak.sel

xarray.Dataset.xoak.sel#

Dataset.xoak.sel(indexers=None, **indexers_kwargs)#

Selection based on a ball tree index.

Warning

This method has been deprecated. Please use the Xarray API instead ds.sel(...) after setting an xarray.indexes.NDPointIndex with one of the tree adapter classes available in Xoak.

The index must have been already built using xoak.set_index().

It behaves mostly like xarray.Dataset.sel() and xarray.DataArray.sel() methods, with some limitations:

  • Orthogonal indexing is not supported

  • For vectorized (point-wise) indexing, you need to supply xarray objects

  • Use it for nearest neighbor lookup only (it implicitly assumes method=”nearest”)

This triggers dask.compute() if the given indexers and/or the index coordinates are chunked.