def col_scale(x, s):
    """
    Scale each columns of a sparse matrix by the corresponding element of a
    dense vector.

    Parameters
    ----------
    x
        A sparse matrix.
    s
        A dense vector with length equal to the number of columns of `x`.

    Returns
    -------
    A sparse matrix in the same format as `x` which each column had been
    multiply by the corresponding element of `s`.

    Notes
    -----
    The grad implemented is structured.

    """

    if x.format == 'csc':
        return ColScaleCSC()(x, s)
    elif x.format is 'csr':
        return RowScaleCSC()(x.T, s).T
    else:
        raise NotImplementedError()
dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/sparse/basic.py/col_scale/operator `==` -> `is`