主页
Python
SciPy 空间数据
demo_scipy_spatial_kdtree
运行 ❯
×
更改方向
保存代码
更改主题
from scipy.spatial import KDTree points = [(1, -1), (2, 3), (-2, 3), (2, -3)] kdtree = KDTree(points) res = kdtree.query((1, 1)) print(res)
(2.0, 0)