Skip to content

Commit 78f9426

Browse files
author
Feynman Liang
committed
Add casts
1 parent 43d28fa commit 78f9426

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mllib/src/test/scala/org/apache/spark/mllib/linalg/MatricesSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ class MatricesSuite extends SparkFunSuite {
8282
val dm2 = Matrices.dense(2, 2, Array(0.0, 2.0, 1.0, 3.0))
8383
assert(dm1 === dm2.transpose)
8484

85-
val sm1 = dm1.toSparse
85+
val sm1 = dm1.asInstanceOf[DenseMatrix].toSparse
8686
assert(sm1 === sm1)
8787
assert(sm1 !== sm1.transpose)
8888

89-
val sm2 = dm2.toSparse
89+
val sm2 = dm2.asInstanceOf[DenseMatrix].toSparse
9090
assert(sm1 === sm2.transpose)
9191
}
9292

0 commit comments

Comments
 (0)