Search code examples
scalascala-breeze

Scala Breeze prefix scalar multiplication


When using Breeze do I have to import some implicit conversions to make prefix scalar multiplication work?

val v = DenseVector(1.0, 2.0, 3.0)
val r = 2.0 * v

The above doesn't work, where as:

val r = v * 2.0

Does work.


Solution

  • Breeze doesn't define any implicit conversions for Double etc. right now. I should add them, but there's nothing yet.