我是 Breeze(以前是 Scalala)的新手,不知道为什么下面的简单程序会引发异常。我正在使用 Scala 2.9.2 和 Breeze 0.1:
import breeze.linalg._
val m = DenseMatrix((3.0, 1.0, 2.0), (-2.0, 1.0, 3.0))
val n = mean(m, Axis._1)
如果我使用 2x2 或 3x2 矩阵,它会按预期工作,但 2x3 矩阵会导致以下异常:
-- org.jblas ERROR Couldn't load copied link file: java.lang.UnsatisfiedLinkError: C:\Users\daved\AppData\Local\Temp\jblas8588491482847885553jblas.dll: Can't find dependent libraries.
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 6
at breeze.linalg.package$$anon$1.apply$mcD$sp(package.scala:203)
at breeze.linalg.package$$anon$1.apply(package.scala:196)
at breeze.linalg.package$$anon$1.apply(package.scala:186)
at breeze.linalg.DenseVector.ureduce(DenseVector.scala:91)
at breeze.linalg.Tensor$$anon$1.apply(Tensor.scala:149)
at breeze.generic.UReduceable$class.apply$mcD$sp(URFunc.scala:56)
at breeze.linalg.Tensor$$anon$1.apply$mcD$sp(Tensor.scala:148)
at breeze.generic.URFunc$mcD$sp$class.apply$mcD$sp(URFunc.scala:32)
at breeze.linalg.package$$anon$1.apply$mcD$sp(package.scala:186)
at breeze.generic.URFunc$mcD$sp$$anonfun$apply$mcD$sp$1.apply(URFunc.scala:36)
at breeze.linalg.LowPriorityDenseMatrix1$$anon$17.apply(DenseMatrix.scala:444)
at breeze.linalg.LowPriorityDenseMatrix1$$anon$17.apply(DenseMatrix.scala:440)
at breeze.generic.URFunc$mcD$sp$class.apply$mcD$sp(URFunc.scala:36)
at breeze.linalg.package$$anon$1.apply$mcD$sp(package.scala:186)
at com.tennisedge.opencv.BreezePlay$delayedInit$body.apply(BreezePlay.scala:24)