(self, indexes)
return np.asarray(example_arr), np.asarray(label_arr)
Retrieve by indexes.

        Parameters
        ----------
        indexes: array-like or object
            The indexes used for retrieving.
            Note that, if you want to retrieve by 2 or more indexes, a list, np.ndarray or BaseCollection is expected.
            Otherwise, it will be treated as only one index.

        Returns
        -------
        X: array-like
            The retrieved instances.

        y: array-like
            The retrieved labels.
Retrieve by indexes.
Retrieve by indexes .
def retrieve_by_indexes(self, indexes):
        """Retrieve by indexes.

        Parameters
        ----------
        indexes: array-like or object
            The indexes used for retrieving.
            Note that, if you want to retrieve by 2 or more indexes, a list, np.ndarray or BaseCollection is expected.
            Otherwise, it will be treated as only one index.

        Returns
        -------
        X: array-like
            The retrieved instances.

        y: array-like
            The retrieved labels.
        """
        if not isinstance(indexes, (list, np.ndarray, BaseCollection)):
            indexes = [indexes]
        example_arr = []
        label_arr = []
        for k in indexes:
            if k in self._ind2label.keys():
                label_arr.append(self._ind2label[k])
                if self._instance_flag:
                    example_arr.append(self._ind2exa[k])
            else:
                warnings.warn("Index %s for retrieving is not in the repository, skip." % str(k),
                              category=ValidityWarning)
        return np.asarray(example_arr), np.asarray(label_arr)
def retrieve_by_indexes ( self , indexes ) : if not isinstance ( indexes , ( list , np . ndarray , BaseCollection ) ) : indexes = [ indexes ] example_arr = [ ] label_arr = [ ] for k in indexes : if k in self . _ind2label . keys ( ) : label_arr . append ( self . _ind2label [ k ] ) if self . _instance_flag : example_arr . append ( self . _ind2exa [ k ] ) else : warnings . warn ( "Index %s for retrieving is not in the repository, skip." % str ( k ) , category = ValidityWarning ) return np . asarray ( example_arr ) , np . asarray ( label_arr )