Github user seddonm1 commented on the pull request:
https://github.com/apache/spark/pull/10976#issuecomment-183506233
Thanks @mengxr.
I have updated the pull request with your suggestions. I believe that we
still need to use the .compressed even after moving the `if (value > td) {` so
that we can 'Return a vector in either dense or sparse format, whichever uses
less storage.' which will occur if all values in a dense vector are greater
than the threshold.
`Vectors.sparse(data.size, indices.result(), values.result()).compressed`
---
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]