Skip to content

Commit 43d28fa

Browse files
author
Feynman Liang
committed
Fix failing test
1 parent 6416fa0 commit 43d28fa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,11 @@ class SparseMatrix(
519519
rowIndices: Array[Int],
520520
values: Array[Double]) = this(numRows, numCols, colPtrs, rowIndices, values, false)
521521

522+
override def equals(o: Any): Boolean = o match {
523+
case m: SparseMatrix => toBreeze == m.toBreeze
524+
case _ => false
525+
}
526+
522527
private[mllib] def toBreeze: BM[Double] = {
523528
if (!isTransposed) {
524529
new BSM[Double](values, numRows, numCols, colPtrs, rowIndices)

0 commit comments

Comments
 (0)