sum

abstract fun <T : Number, D : Dimension> sum(a: MultiArray<T, D>): T

Returns sum of all elements in the given ndarray.


abstract fun <T : Number, D : Dimension, O : Dimension> sum(a: MultiArray<T, D>, axis: Int): NDArray<T, O>

Returns an ndarray of sum all elements over a given axis.