(self, container)
return copy.copy(container)
Check if the given array is an array of multi label indexes.
Check if the given array is an array of multi label indexes.
Check if the given array is an array of multi label indexes .
def _check_multi_label_ind(self, container):
        """Check if the given array is an array of multi label indexes."""
        if not isinstance(container, MultiLabelIndexCollection):
            try:
                if isinstance(container[0], tuple):
                    container = MultiLabelIndexCollection(container, self.y.shape[1])
                else:
                    container = MultiLabelIndexCollection.construct_by_1d_array(container, label_mat_shape=self.y.shape)
            except:
                raise ValueError(
                    "Please pass a 1d array of indexes or MultiLabelIndexCollection (column major, "
                    "start from 0) or a list "
                    "of tuples with 2 elements, in which, the 1st element is the index of instance "
                    "and the 2nd element is the index of label.")
        return copy.copy(container)
def _check_multi_label_ind ( self , container ) : if not isinstance ( container , MultiLabelIndexCollection ) : try : if isinstance ( container [ 0 ] , tuple ) : container = MultiLabelIndexCollection ( container , self . y . shape [ 1 ] ) else : container = MultiLabelIndexCollection . construct_by_1d_array ( container , label_mat_shape = self . y . shape ) except : raise ValueError ( "Please pass a 1d array of indexes or MultiLabelIndexCollection (column major, " "start from 0) or a list " "of tuples with 2 elements, in which, the 1st element is the index of instance " "and the 2nd element is the index of label." ) return copy . copy ( container )