Run ❯
×
Change Orientation
Change Theme, Dark/Light
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)