Github user srowen commented on the issue:

    https://github.com/apache/spark/pull/16038
  
    It might be as simple as writing `Vectors.sparse(n, Seq())` as the zero 
value. Everything else appears to operate on a Vector that's either sparse or 
dense then. (Of course, the first call to axpy should produce a dense vector, 
but, that's already on the executor.)
    
    The method does ultimately want to return a dense vector, and does insert a 
cast that assumes it's already a dense vector. If that's a problem, it's easy 
to insert a call to `.toDense` on the `Vector` at the end, which is a no-op if 
it's already dense, which definitely produces a dense vector.


---
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]

Reply via email to