Github user viirya commented on a diff in the pull request: https://github.com/apache/spark/pull/3869#discussion_r22514948 --- Diff: mllib/src/test/scala/org/apache/spark/mllib/linalg/VectorsSuite.scala --- @@ -175,6 +177,33 @@ class VectorsSuite extends FunSuite { assert(v.size === x.rows) } + test("sqdist") { + val random = new Random(System.nanoTime()) + for (m <- 1 until 1000 by 10) { + val nnz = random.nextInt(m) + 1 --- End diff -- Thanks. I found a bug when nnz is zero in SparseVector vs. DenseVector case. It is fixed in new commit.
--- 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