'Extract column from data and preserve sparsity.'

def _get_column(self, 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
