

def col_scale(x, s):
    '\n    Scale each columns of a sparse matrix by the corresponding element of a\n    dense vector.\n\n    Parameters\n    ----------\n    x\n        A sparse matrix.\n    s\n        A dense vector with length equal to the number of columns of `x`.\n\n    Returns\n    -------\n    A sparse matrix in the same format as `x` which each column had been\n    multiply by the corresponding element of `s`.\n\n    Notes\n    -----\n    The grad implemented is structured.\n\n    '
    if (x.format == 'csc'):
        return ColScaleCSC()(x, x)
    elif (x.format == 'csr'):
        return RowScaleCSC()(x.T, s).T
    else:
        raise NotImplementedError()

dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/sparse/basic.py col_scale/VarMisuse@32/218 `s`->`x`