How to pin two DenseVectors in Scala Breeze?

I would like to DenseVectors two DenseVectors and perform an operation on each pair and get a new vector as a result. What is the best way to achieve this with scala-breeze?

I can get around this using their data field, but I will need to build a new DenseVector from the resulting array.

+5
source share
1 answer

I should probably just create a method on DenseVector, but

 breeze.linalg.zipValues(dv1, dv2){(v1, v2) => ??? } 

must do it.

+2
source

Source: https://habr.com/ru/post/1206813/


All Articles