(self, data, group_var=None, column_split_key=None)
return Parts(row_groups, col_groups, span=(minv, maxv))
Make initial `Parts` for data, split by group_var, group_key
Make initial `Parts` for data, split by group_var, group_key
Make initial Parts for data split by group_var group_key
def _make_parts(self, data, group_var=None, column_split_key=None):
        """
        Make initial `Parts` for data, split by group_var, group_key
        """
        if group_var is not None:
            assert group_var.is_discrete
            _col_data = table_column_data(data, group_var)
            row_indices = [np.flatnonzero(_col_data == i)
                           for i in range(len(group_var.values))]

            row_groups = [RowPart(title=name, indices=ind,
                                  cluster=None, cluster_ordered=None)
                          for name, ind in zip(group_var.values, row_indices)]
            if np.any(_col_data.mask):
                row_groups.append(RowPart(
                    title="N/A", indices=np.flatnonzero(_col_data.mask),
                    cluster=None, cluster_ordered=None
                ))
        else:
            row_groups = [RowPart(title=None, indices=range(0, len(data)),
                                  cluster=None, cluster_ordered=None)]

        if column_split_key is not None:
            col_groups = split_domain(data.domain, column_split_key)
            assert len(col_groups) > 0
            col_indices = [np.array([data.domain.index(var) for var in group])
                           for _, group in col_groups]
            col_groups = [ColumnPart(title=str(name), domain=d, indices=ind,
                                     cluster=None, cluster_ordered=None)
                          for (name, d), ind in zip(col_groups, col_indices)]
        else:
            col_groups = [
                ColumnPart(
                    title=None, indices=range(0, len(data.domain.attributes)),
                    domain=data.domain.attributes, cluster=None, cluster_ordered=None)
            ]

        minv, maxv = np.nanmin(data.X), np.nanmax(data.X)
        return Parts(row_groups, col_groups, span=(minv, maxv))
def _make_parts ( self , data , group_var = None , column_split_key = None ) : if group_var is not None : assert group_var . is_discrete _col_data = table_column_data ( data , group_var ) row_indices = [ np . flatnonzero ( _col_data == i ) for i in range ( len ( group_var . values ) ) ] row_groups = [ RowPart ( title = name , indices = ind , cluster = None , cluster_ordered = None ) for name , ind in zip ( group_var . values , row_indices ) ] if np . any ( _col_data . mask ) : row_groups . append ( RowPart ( title = "N/A" , indices = np . flatnonzero ( _col_data . mask ) , cluster = None , cluster_ordered = None ) ) else : row_groups = [ RowPart ( title = None , indices = range ( 0 , len ( data ) ) , cluster = None , cluster_ordered = None ) ] if column_split_key is not None : col_groups = split_domain ( data . domain , column_split_key ) assert len ( col_groups ) > 0 col_indices = [ np . array ( [ data . domain . index ( var ) for var in group ] ) for _ , group in col_groups ] col_groups = [ ColumnPart ( title = str ( name ) , domain = d , indices = ind , cluster = None , cluster_ordered = None ) for ( name , d ) , ind in zip ( col_groups , col_indices ) ] else : col_groups = [ ColumnPart ( title = None , indices = range ( 0 , len ( data . domain . attributes ) ) , domain = data . domain . attributes , cluster = None , cluster_ordered = None ) ] minv , maxv = np . nanmin ( data . X ) , np . nanmax ( data . X ) return Parts ( row_groups , col_groups , span = ( minv , maxv ) )