quantnn/generic/__init__.py
def cumsum(module, y, dimension):
    """
    Cumulative sum along given axis.

    Arguments:
        module: The backend array corresponding to the given array.
        y: Rank k-tensor to accumulate along given dimension.
        dimension: The dimension to sum over.

    Return:
       The rank k tensor containing the cumulative sum along the given dimension.
    """
    _import_modules()
    if module in [np, ma, torch, jnp]:
        return module.cumsum(y, axis=dimension)
    elif module == tf:
        return tf.math.cumsum(y, dimension)

    Cumulative sum along given axis.

    Arguments:
        module: The backend array corresponding to the given array.
        y: Rank k-tensor to accumulate along given dimension.
        dimension: The dimension to sum over.

    Return:
       The rank k tensor containing the cumulative sum along the given dimension.
    
Cumulative sum along given axis.
Cumulative sum along given axis .
def cumsum(module, y, dimension):
    _import_modules()
    if module in [np, ma, torch, jnp]:
        return module.cumsum(y, axis=dimension)
    elif module == tf:
        return tf.math.cumsum(y, dimension)
def cumsum ( module , y , dimension ) : _import_modules ( ) if module in [ np , ma , torch , jnp ] : return module . cumsum ( y , axis = dimension ) elif module == tf : return tf . math . cumsum ( y , dimension )
Cumulative sum along given axis.
Cumulative sum along given axis .
"""
    Cumulative sum along given axis.

    Arguments:
        module: The backend array corresponding to the given array.
        y: Rank k-tensor to accumulate along given dimension.
        dimension: The dimension to sum over.

    Return:
       The rank k tensor containing the cumulative sum along the given dimension.
    """
module
The backend array corresponding to the given array.
The backend array corresponding to the given array .
y
Rank k-tensor to accumulate along given dimension.
Rank k - tensor to accumulate along given dimension .
dimension
The dimension to sum over.
The dimension to sum over .