Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxr committed Dec 23, 2014
1 parent ecc937a commit 80cfa29
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -740,16 +740,13 @@ object Matrices {
val numCols = matrices(0).numCols
var hasSparse = false
var numRows = 0
var valsLength = 0
matrices.foreach { mat =>
require(numCols == mat.numCols, "The number of rows of the matrices in this sequence, " +
"don't match!")
mat match {
case sparse: SparseMatrix =>
hasSparse = true
valsLength += sparse.values.length
case dense: DenseMatrix =>
valsLength += dense.values.length
case _ => throw new IllegalArgumentException("Unsupported matrix format. Expected " +
s"SparseMatrix or DenseMatrix. Instead got: ${mat.getClass}")
}
Expand Down

0 comments on commit 80cfa29

Please sign in to comment.