running sum $\sum +$

Computes the running sum of the input tensor along a given axis. For example, take this rank 2 tensor:


\begin{displaymath}
\left(
\begin{array}{cccc}
1& 2& 3& 4 \\
5& 4& 3& 2 \\
8& 7& 6& 5
\end{array} \right)
\end{displaymath}

The running sum of this tensor, along the horizontal dimension, is:


\begin{displaymath}
\left(
\begin{array}{cccc}
1& 3& 6& 10 \\
5& 9& 12& 14 \\
8& 15& 21& 26
\end{array} \right)
\end{displaymath}