xoak.IndexAdapter¶
- class xoak.IndexAdapter(**kwargs)[source]¶
Base class for reusing a custom index to select data in
xarray.DataArray
orxarray.Dataset
objects with xoak.Subclasses must implement the
build()
andquery()
methods, which are called to build a new index and query this index, respectively.If any options are necessary, they should be implemented as arguments to the
__init__()
method.Methods
__init__
(**kwargs)build
(points)Build the index from a set of points/samples and their coordinate labels.
query
(index, points)Query points/samples,