Scala Breeze DenseVector隐式故障 [英] Scala Breeze DenseVector Implicit failure
问题描述
我已经开始遇到这个奇怪的错误;完全不确定是什么原因造成的-也许是Maven重建.我无法解释这种行为...有时它可以在IntelliJ中工作,有时不能,并且当我从jar文件运行它时失败.
I've started getting this strange error; completely not sure what caused it - maybe a Maven rebuild. I can't explain this behavior... sometimes it works in IntelliJ, sometimes it doesn't, and it is failing when I run it from a jar file.
这是运行时错误:
java.lang.NoSuchMethodError: breeze.linalg.DenseVector$.canScaleD()Lbreeze/linalg/operators/BinaryOp
,它出现在以下代码中:
and it occurs in this code:
import breeze.linalg._
import breeze.linalg.DenseVector._
var planeNormal = DenseVector.zeros[Double](39)
weights.zip(vectors).foreach case(w: Double, vector: DenseVector[Double]) =>
planeNormal :+= (vector :* w)
}
在vector :* w
函数调用中.
任何人都对什么地方有问题有任何想法?
Anyone have any ideas about what might be wrong?
我怀疑它的某些版本不匹配,但不知道在哪里修复它;我正在使用这个微风数学包
I suspect its some version mismatch but no clue where to look to fix it; I'm using this breeze-math package
<groupId>org.scalanlp</groupId>
<artifactId>breeze-math_2.10</artifactId>
<version>0.4</version>
和斯卡拉
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.10.3</version>
推荐答案
您使用的是Breeze的非常老版本.请使用0.8.1(工件ID现在仅为breeze_2.10)
You're using a really, really old version of Breeze. Please use 0.8.1 (Artifact id is just breeze_2.10 now)
这篇关于Scala Breeze DenseVector隐式故障的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!