You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2016/10/15 00:28:20 UTC
[jira] [Assigned] (SPARK-17950) Match SparseVector behavior with
DenseVector
[ https://issues.apache.org/jira/browse/SPARK-17950?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-17950:
------------------------------------
Assignee: Apache Spark
> Match SparseVector behavior with DenseVector
> --------------------------------------------
>
> Key: SPARK-17950
> URL: https://issues.apache.org/jira/browse/SPARK-17950
> Project: Spark
> Issue Type: Improvement
> Components: MLlib, PySpark
> Affects Versions: 2.0.1
> Reporter: AbderRahman Sobh
> Assignee: Apache Spark
> Priority: Minor
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> Simply added the `__getattr__` to SparseVector that DenseVector has, but calls self.toArray() instead of storing a vector all the time in self.array
> This allows for use of numpy functions on the values of a SparseVector in the same direct way that users interact with DenseVectors.
> i.e. you can simply call SparseVector.mean() to average the values in the entire vector.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org