You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by "Daniel, Ronald (ELS-SDG)" <R....@elsevier.com> on 2015/03/10 00:21:02 UTC

sparse vector operations in Python

Hi,

Sorry to ask this, but how do I compute the sum of 2 (or more) mllib SparseVectors in Python?

Thanks,
Ron


 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Re: sparse vector operations in Python

Posted by Joseph Bradley <jo...@databricks.com>.
There isn't a great way currently.  The best option is probably to convert
to scipy.sparse column vectors and add using scipy.
Joseph

On Mon, Mar 9, 2015 at 4:21 PM, Daniel, Ronald (ELS-SDG) <
R.Daniel@elsevier.com> wrote:

> Hi,
>
> Sorry to ask this, but how do I compute the sum of 2 (or more) mllib
> SparseVectors in Python?
>
> Thanks,
> Ron
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@spark.apache.org
> For additional commands, e-mail: user-help@spark.apache.org
>
>