dimredtools.NearestNeighbors
- class dimredtools.NearestNeighbors
An abstract class for data structures that implement nearest neighbor search.
- __init__(*args, **kwargs)
- query(self: dimredtools_pybind.NearestNeighbors, point: numpy.ndarray[numpy.float64[1, n]], k: int, sort_results: bool = True) Tuple[numpy.ndarray[numpy.float64[1, n]], numpy.ndarray[numpy.int32[1, n]]]
Retrieves the k-nearest neighbors for the query point.
- query_radius(self: dimredtools_pybind.NearestNeighbors, point: numpy.ndarray[numpy.float64[1, n]], r: float, sort_results: bool = False) Tuple[numpy.ndarray[numpy.float64[1, n]], numpy.ndarray[numpy.int32[1, n]]]
Retrieves all the neighbors of the query point in the specified radius.