[SPARK-36685][ML][MLLIB] Fix wrong assert messages

### What changes were proposed in this pull request?
Fix wrong assert statement, a mistake when coding

### Why are the changes needed?
 wrong assert statement

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
 Existing tests

Closes #33953 from dgd-contributor/SPARK-36685.

Authored-by: dgd-contributor <dgd_contributor@viettel.com.vn>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
This commit is contained in:
dgd-contributor 2021-09-11 14:39:42 -07:00 committed by Dongjoon Hyun
parent e5283f5ed5
commit 9af0132516
2 changed files with 2 additions and 2 deletions

View file

@ -1263,7 +1263,7 @@ object Matrices {
var hasSparse = false
var numRows = 0
matrices.foreach { mat =>
require(numCols == mat.numCols, "The number of rows of the matrices in this sequence, " +
require(numCols == mat.numCols, "The number of columns of the matrices in this sequence, " +
"don't match!")
mat match {
case sparse: SparseMatrix => hasSparse = true

View file

@ -1174,7 +1174,7 @@ object Matrices {
var hasSparse = false
var numRows = 0
matrices.foreach { mat =>
require(numCols == mat.numCols, "The number of rows of the matrices in this sequence, " +
require(numCols == mat.numCols, "The number of columns of the matrices in this sequence, " +
"don't match!")
mat match {
case sparse: SparseMatrix => hasSparse = true