def _part_ind(self, ptype):
    try:
        _scipy.spatial.KDTree
        return self._part_ind_KDTree(ptype)
    except ImportError:
        return self._part_ind_brute_force(ptype)
def _part_ind(self, ptype):
    try:
        _scipy.spatial.KDTree
        return self._part_ind_KDTree(ptype)
    except ImportError:
        return self._part_ind_brute_force(ptype)