Github user funes commented on a diff in the pull request:
https://github.com/apache/spark/pull/661#discussion_r12413127
--- Diff:
mllib/src/test/scala/org/apache/spark/mllib/linalg/BreezeVectorConversionSuite.scala
---
@@ -55,4 +55,16 @@ class BreezeVectorConversionSuite extends FunSuite {
assert(vec.indices.eq(indices), "should not copy data")
assert(vec.values.eq(values), "should not copy data")
}
+
+ test("sparse breeze by vector builder to vector") {
--- End diff --
@mengxr There always has <code>activeSize < index.length</code> in Breeze
SparseVector. I don't see the problem. Do you mean we also check it in the test
case?
btw, maybe we could keep a same <activeSize> in our SparseVector? That
would avoid the data copying issue in conversion.
---
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.
---