Skip to content

Commit ce0bb8b

Browse files
committed
Still need to scal y when beta is 0.0 because it clears out y.
1 parent b890e63 commit ce0bb8b

File tree

1 file changed

+1
-4
lines changed
  • mllib/src/main/scala/org/apache/spark/mllib/linalg

1 file changed

+1
-4
lines changed

mllib/src/main/scala/org/apache/spark/mllib/linalg/BLAS.scala

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -659,10 +659,7 @@ private[spark] object BLAS extends Serializable with Logging {
659659
rowCounter += 1
660660
}
661661
} else {
662-
// Scale vector first if `beta` is not equal to 0.0
663-
if (beta != 0.0) {
664-
scal(beta, y)
665-
}
662+
scal(beta, y)
666663
// Perform matrix-vector multiplication and add to y
667664
var colCounterForA = 0
668665
while (colCounterForA < nA) {

0 commit comments

Comments
 (0)