def invalidate_distances(self): self._tree = cKDTree(self.params.X) self._distances, self._neighbors = None, None