We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ecc937a commit 80cfa29Copy full SHA for 80cfa29
mllib/src/main/scala/org/apache/spark/mllib/linalg/Matrices.scala
@@ -740,16 +740,13 @@ object Matrices {
740
val numCols = matrices(0).numCols
741
var hasSparse = false
742
var numRows = 0
743
- var valsLength = 0
744
matrices.foreach { mat =>
745
require(numCols == mat.numCols, "The number of rows of the matrices in this sequence, " +
746
"don't match!")
747
mat match {
748
case sparse: SparseMatrix =>
749
hasSparse = true
750
- valsLength += sparse.values.length
751
case dense: DenseMatrix =>
752
- valsLength += dense.values.length
753
case _ => throw new IllegalArgumentException("Unsupported matrix format. Expected " +
754
s"SparseMatrix or DenseMatrix. Instead got: ${mat.getClass}")
755
}
0 commit comments