0

I am merely trying to change an element of a DenseVector[Double] from the Breeze linear algebra package. My minimal example looks like this:

import breeze.linalg.{DenseVector}

val p = 20
val B = DenseVector.rand(p).map(x=>0.0)
val i=0
B(i)=4

Compiling this in intellijidea results in a complicated error enter image description here

If I replace B(i)=4 with B(0)=4 then everything works out fine.

Lindon
  • 1,292
  • 1
  • 10
  • 21

1 Answers1

1

There is a method "update" which does the job.

Lindon
  • 1,292
  • 1
  • 10
  • 21