SciPy

scipy.spatial.cKDTree.n

cKDTree.n