libpysal.cg.fast_knn¶
-
libpysal.cg.
fast_knn
(pts, k, return_dist=False)[source]¶ Computes k nearest neighbors on a sphere.
- Parameters
- pts
python:list
of
x,ypairs
- k
python:int
Number of points to query
- return_distbool
Return distances in the ‘wd’ container object
- pts
- Returns
- wn
python:list
list of neighbors
- wd
python:list
list of neighbor distances (optional)
- wn