Method CumSum
CumSum(TensorFloat, int, bool, bool)
Performs the cumulative sum along a given axis.
Declaration
public TensorFloat CumSum(TensorFloat X, int axis, bool reverse = false, bool exclusive = false)
Parameters
| Type | Name | Description |
|---|---|---|
| TensorFloat | X | The input tensor. |
| int | axis | The axis along which to apply the cumulative sum. |
| bool | reverse | Whether to perform the cumulative sum from the end of the axis. |
| bool | exclusive | Whether to include the respective input element in the cumulative sum. |
Returns
| Type | Description |
|---|---|
| TensorFloat | The computed output tensor. |
CumSum(TensorInt, int, bool, bool)
Performs the cumulative sum along a given axis.
Declaration
public TensorInt CumSum(TensorInt X, int axis, bool reverse = false, bool exclusive = false)
Parameters
| Type | Name | Description |
|---|---|---|
| TensorInt | X | The input tensor. |
| int | axis | The axis along which to apply the cumulative sum. |
| bool | reverse | Whether to perform the cumulative sum from the end of the axis. |
| bool | exclusive | Whether to include the respective input element in the cumulative sum. |
Returns
| Type | Description |
|---|---|
| TensorInt | The computed output tensor. |