xoak.index.scipy_adapters.ScipyKDTreeAdapter

class xoak.index.scipy_adapters.ScipyKDTreeAdapter(**kwargs)[source]

Xoak index adapter for scipy.spatial.cKDTree.

This index adapter is registered in xoak under the name scipy_kdtree. You can use it in xarray.Dataset.xoak.set_index() by simply providing its name for the index_type argument. Alternatively, you can access it via the index registry, i.e.,

>>> import xoak
>>> ireg = xoak.IndexRegistry()
>>> ireg.scipy_kdtree
__init__(**kwargs)[source]

Methods

__init__(**kwargs)

build(points)

Build the index from a set of points/samples and their coordinate labels.

query(kdtree, points)

Query points/samples,