Nearest Neighbor Search in Python without k-d tree

后端 未结 4 810
余生分开走
余生分开走 2021-02-08 08:16

I\'m beginning to learn Python coming from a C++ background. What I am looking for is a quick and easy way to find the closest (nearest neighbor) of some multidimensional query

4条回答
  •  伪装坚强ぢ
    2021-02-08 08:58

    You can compute all distances scipy.spatial.distance.cdist( X, Y ) or use RTree for dynamic data: http://gispython.org/rtree/docs/class.html .

提交回复
热议问题