Back to NDArray Operations
sum
Sum of array elements. With dim, reduces along the given axis.
Syntax
sum(a: NDArray) → r
Backends
TypeScriptnumwa
Description
Sum of array elements. With dim, reduces along the given axis.
Parameters
| Name | Description |
|---|---|
| a | Input array |
Returns
Scalar sum of all elements, or NDArray when reducing along an axis