Skip to content

Commit 80cfa29

Browse files
committed
minor changes
1 parent ecc937a commit 80cfa29

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -740,16 +740,13 @@ object Matrices {
740740
val numCols = matrices(0).numCols
741741
var hasSparse = false
742742
var numRows = 0
743-
var valsLength = 0
744743
matrices.foreach { mat =>
745744
require(numCols == mat.numCols, "The number of rows of the matrices in this sequence, " +
746745
"don't match!")
747746
mat match {
748747
case sparse: SparseMatrix =>
749748
hasSparse = true
750-
valsLength += sparse.values.length
751749
case dense: DenseMatrix =>
752-
valsLength += dense.values.length
753750
case _ => throw new IllegalArgumentException("Unsupported matrix format. Expected " +
754751
s"SparseMatrix or DenseMatrix. Instead got: ${mat.getClass}")
755752
}

0 commit comments

Comments
 (0)