napf.base.KDT.knn_search#
- KDT.knn_search(queries, kneighbors, nthread=None)[source]#
k-nearest-neighbor search.
- Parameters:
queries ((m, d) np.ndarray) – Data type will be casted to the same type as tree_data.
kneighbors (int)
nthread (int) – Default is None and will use self.nthread.
- Returns:
ids_and_distances –
- ((m, kneighbors) np.ndarray - double dists,)
(m, kneighbors) np.ndarray - uint ids)
- Return type:
tuple