Skip to main content
Ctrl+K

napf 0.1.0 documentation

  • Github
  • API Reference
  • Github
  • API Reference

Section Navigation

  • napf
    • napf.base
      • napf.base.core_class_str_and_data
      • napf.base.enforce_contiguous
      • napf.base.validate_metric_input
      • napf.base.KDT
        • napf.base.KDT.knn_search
        • napf.base.KDT.newtree
        • napf.base.KDT.query
        • napf.base.KDT.query_ball_point
        • napf.base.KDT.radii_search
        • napf.base.KDT.radius_search
        • napf.base.KDT.rknn_search
        • napf.base.KDT.unique_data_and_inverse
        • napf.base.KDT.core_tree
        • napf.base.KDT.dtype
        • napf.base.KDT.nthread
        • napf.base.KDT.tree_data
  • API References
  • napf.base.KDT
  • napf.base.KD...

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

previous

napf.base.KDT

next

napf.base.KDT.newtree

On this page
  • KDT.knn_search()
Show Source

© Copyright 2022, Jaewook Lee.

Created using Sphinx 7.4.7.

Built with the PyData Sphinx Theme 0.15.4.