pub fn sum<T>(a: &[T]) -> T
where T: Float + Sum<T> + Mul<T, Output = T>,
Expand description

Calculate the sum of all elements of a vector