Github user bwahlgreen commented on a diff in the pull request:
https://github.com/apache/spark/pull/15296#discussion_r81124169
--- Diff: mllib-local/src/main/scala/org/apache/spark/ml/linalg/BLAS.scala
---
@@ -638,12 +638,18 @@ private[spark] object BLAS extends Serializable {
val indEnd = Arows(rowCounter + 1)
var sum = 0.0
var k = 0
- while (k < xNnz && i < indEnd) {
+ while (i < indEnd && k < xNnz) {
if (xIndices(k) == Acols(i)) {
sum += Avals(i) * xValues(k)
+ k += 1
+ i += 1
+ }
+ else if (xIndices(k) < Acols(i)) {
--- End diff --
elses on previous line, done. I must admit I haven't gone through the
non-transpose case in as much detail, but that does not seem affected by this
bug. Should I perhaps add a test that shows the non-transpose case is/remains
unaffected?
---
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]