(self, example)
return ind
Find the index of the given example in the repository.
Find the index of the given example in the repository.
Find the index of the given example in the repository .
def _find_one_example(self, example):
        """Find the index of the given example in the repository."""
        found = False
        for id, vec in enumerate(self._X):
            if np.all(vec == example):
                ind = id
                found = True
                break
        if not found:
            return -1
        return ind
def _find_one_example ( self , example ) : found = False for id , vec in enumerate ( self . _X ) : if np . all ( vec == example ) : ind = id found = True break if not found : return - 1 return ind