Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5048#discussion_r26516448
  
    --- Diff: 
mllib/src/test/scala/org/apache/spark/mllib/linalg/MatricesSuite.scala ---
    @@ -424,4 +424,15 @@ class MatricesSuite extends FunSuite {
         assert(mat.rowIndices.toSeq === Seq(3, 0, 2, 1))
         assert(mat.values.toSeq === Seq(1.0, 2.0, 3.0, 4.0))
       }
    +
    +  test("MatrixUDT") {
    +    val dm1 = new DenseMatrix(2, 2, Array(0.9, 1.2, 2.3, 9.8))
    +    val dm2 = new DenseMatrix(0, 0, Array())
    +    val sm1 = dm1.toSparse
    +    val sm2 = dm2.toSparse
    +    val mUDT = new MatrixUDT()
    +    Seq(dm1, dm2, sm1, sm2).foreach {
    +        mat => assert(mat == mUDT.deserialize(mUDT.serialize(mat)))
    --- End diff --
    
    use `===` instead of `==`. The former contains more info in the error 
message.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to