DenseMatrix constructor fails

179 views
Skip to first unread message

Brian Schlining

unread,
Jan 7, 2015, 5:20:26 PM1/7/15
to scala-...@googlegroups.com

Hi All (and David),

I set up an SBT project to use Breeze and I’m getting the following error in the Console when constructing a DenseMatrix:

error: could not find implicit value for parameter rl: breeze.linalg.support.LiteralRow[Any,V]

The full text of what I did is below. My project is using version 0.10 of breeze and breeze-natives:

sbt> console
[info] Compiling 5 Scala sources to /Users/brian/playspace/coursera-image_video/assignments-openimaj/target/scala-2.11/classes...
[info] Starting scala interpreter...
[info]
Welcome to Scala version 2.11.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_25).
Type in expressions to have them evaluated.
Type :help for more information.

scala> import breeze.linalg._
import breeze.linalg._

scala> import breeze.numerics._
import breeze.numerics._

scala> DenseMatrix(2, 3, Array(11, 12, 13, 21, 22, 23))
<console>:14: error: could not find implicit value for parameter rl: breeze.linalg.support.LiteralRow[Any,V]
              DenseMatrix(2, 3, Array(11, 12, 13, 21, 22, 23))
                         ^

scala>

Did I forget to import something??

Thanks!



-- 
Brian Schlining

David Hall

unread,
Jan 7, 2015, 5:23:39 PM1/7/15
to scala-...@googlegroups.com
use "new" for that kind of constructor.

--
You received this message because you are subscribed to the Google Groups "Scala Breeze" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-breeze...@googlegroups.com.
To post to this group, send email to scala-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-breeze/etPan.54adb125.6b8b4567.1ee6%40zen.
For more options, visit https://groups.google.com/d/optout.

Brian Schlining

unread,
Jan 7, 2015, 5:38:08 PM1/7/15
to scala-...@googlegroups.com

doh!

Thanks!

p.s. You might want to update the page at https://github.com/scalanlp/breeze/wiki/Linear-Algebra-Cheat-Sheet. It leaves off the new keyword for the example “Matrix creation from array”.

Cheers


For more options, visit https://groups.google.com/d/optout.
-- 
Brian Schlining

Reply all
Reply to author
Forward
0 new messages