(data, source_var, source_place)
return col_data
Extract column from data and preserve sparsity.
Extract column from data and preserve sparsity.
Extract column from data and preserve sparsity .
def _get_column(data, source_var, source_place):
        """ Extract column from data and preserve sparsity. """
        if source_place == Place.meta:
            col_data = data[:, source_var].metas
        elif source_place == Place.class_var:
            col_data = data[:, source_var].Y.reshape(-1, 1)
        else:
            col_data = data[:, source_var].X
        return col_data
def _get_column ( data , source_var , source_place ) : if source_place == Place . meta : col_data = data [ : , source_var ] . metas elif source_place == Place . class_var : col_data = data [ : , source_var ] . Y . reshape ( - 1 , 1 ) else : col_data = data [ : , source_var ] . X return col_data