SciPy

scipy.spatial.cKDTree.indices

cKDTree.indices