xarray.indexes.TreeAdapter#
- class xarray.indexes.TreeAdapter(points, *, options)[source]#
Lightweight adapter abstract class for plugging in 3rd-party structures.
Structures like
scipy.spatial.KDTreeorsklearn.neighbors.KDTreecan be plugged intoNDPointIndex.- abstractmethod __init__(points, *, options)[source]#
Build the tree structure from the given points.
- Parameters:
points (
ndarrayofshape (n_points,n_coordinates)) – Two-dimensional array of points/samples (rows) and their corresponding coordinate labels (columns) to index.
Methods
__init__(points, *, options)Build the tree structure from the given points.
equals(other)Check equality with another TreeAdapter of the same kind.
query(points)Query points.