

def sp_sum(x, axis=None, sparse_grad=False):
    '\n    Calculate the sum of a sparse matrix along the specified axis.\n\n    It operates a reduction along the specified axis. When `axis` is `None`,\n    it is applied along all axes.\n\n    Parameters\n    ----------\n    x\n        Sparse matrix.\n    axis\n        Axis along which the sum is applied. Integer or `None`.\n    sparse_grad : bool\n        `True` to have a structured grad.\n\n    Returns\n    -------\n    object\n        The sum of `x` in a dense format.\n\n    Notes\n    -----\n    The grad implementation is controlled with the `sparse_grad` parameter.\n    `True` will provide a structured grad and `False` will provide a regular\n    grad. For both choices, the grad returns a sparse matrix having the same\n    format as `x`.\n\n    This op does not return a sparse matrix, but a dense tensor matrix.\n\n    '
    return SpSum(axis, sparse_grad)(x)

dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/sparse/basic.py sp_sum/original