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

    https://github.com/apache/spark/pull/14150#discussion_r70821947
  
    --- Diff: 
mllib/src/test/scala/org/apache/spark/mllib/clustering/LDASuite.scala ---
    @@ -118,8 +118,8 @@ class LDASuite extends SparkFunSuite with 
MLlibTestSparkContext {
             assert(weights.length == 2)
             val bdvTopicDist = topicDistribution.asBreeze
             val top2Indices = argtopk(bdvTopicDist, 2)
    -        assert(top2Indices.toArray === indices)
    -        assert(bdvTopicDist(top2Indices).toArray === weights)
    +        assert(top2Indices.toSet === indices.toSet)
    +        assert(bdvTopicDist(top2Indices).toArray.toSet === weights.toSet)
    --- End diff --
    
    ```argtopk``` does not guarantee the output is sorted. In breeze 0.12, it 
speed up ```argtopk``` for ```breeze.linalg.DenseVector``` with 
```quickSelect``` rather than sorting the vector. So here we should compare the 
equality of set.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to