I have a sequence of DenseVector[Double]
and I would like to sum them elementwise to get a single DenseVector[Double]
. Is there an easy built-in way of doing this in the Breeze Scala library?
How to Elementwise Sum a Sequence of DenseVectors in Breeze
609 views Asked by user1893354 At
1
You can use the
reduce
function and add all the vectors together, as+
is defined as Elementwise Addition forDenseVectors
: