(self, other)
return self
Update self with the union of itself and others.

        Parameters
        ----------
        other: object
            Elements to add. Note that, if multiple indexes are contained,
            a list, numpy.ndarray or MultiLabelIndexCollection should be given. Otherwise,
            a tuple should be given.

        Returns
        -------
        self: object
            Return self.
Update self with the union of itself and others.
Update self with the union of itself and others .
def update(self, other):
        """Update self with the union of itself and others.

        Parameters
        ----------
        other: object
            Elements to add. Note that, if multiple indexes are contained,
            a list, numpy.ndarray or MultiLabelIndexCollection should be given. Otherwise,
            a tuple should be given.

        Returns
        -------
        self: object
            Return self.
        """
        if isinstance(other, (list, np.ndarray, MultiLabelIndexCollection)):
            label_ind = flattern_multilabel_index(other, self._label_size)
            for j in label_ind:
                self.add(j)
        elif isinstance(other, tuple):
            self.add(other)
        else:
            raise TypeError(
                "A list or np.ndarray is expected if multiple indexes are "
                "contained. Otherwise, a tuple should be provided")
        return self
def update ( self , other ) : if isinstance ( other , ( list , np . ndarray , MultiLabelIndexCollection ) ) : label_ind = flattern_multilabel_index ( other , self . _label_size ) for j in label_ind : self . add ( j ) elif isinstance ( other , tuple ) : self . add ( other ) else : raise TypeError ( "A list or np.ndarray is expected if multiple indexes are " "contained. Otherwise, a tuple should be provided" ) return self