srowen commented on a change in pull request #25129:
[SPARK-28159][ML][FOLLOWUP] fix typo & (0 until v.size).toList => List.range(0,
v.size)
URL: https://github.com/apache/spark/pull/25129#discussion_r303048361
##########
File path: mllib/src/main/scala/org/apache/spark/ml/clustering/LDA.scala
##########
@@ -490,7 +490,7 @@ abstract class LDAModel private[ml] (
Vectors.zeros(k)
} else {
val (ids: List[Int], cts: Array[Double]) = vector match {
- case v: DenseVector => ((0 until v.size).toList, v.values)
+ case v: DenseVector => (List.range(0, v.size), v.values)
Review comment:
I think this is OK, as it mirrors a similar change (optimization) we made in
the previous PR. You're right it's orthogonal to the typo fix, but will be fine
to add.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]