spark-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject spark git commit: [SPARK-10516] [ MLLIB] Added values property in DenseVector
Date Wed, 16 Sep 2015 06:25:53 GMT
Repository: spark
Updated Branches:
  refs/heads/master b921fe4dc -> 95b6a8103


[SPARK-10516] [ MLLIB] Added values property in DenseVector

Author: Vinod K C <vinod.kc@huawei.com>

Closes #8682 from vinodkc/fix_SPARK-10516.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/95b6a810
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/95b6a810
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/95b6a810

Branch: refs/heads/master
Commit: 95b6a8103fb527f501ca26b1d6e3a5859970a1e2
Parents: b921fe4
Author: Vinod K C <vinod.kc@huawei.com>
Authored: Tue Sep 15 23:25:51 2015 -0700
Committer: Xiangrui Meng <meng@databricks.com>
Committed: Tue Sep 15 23:25:51 2015 -0700

----------------------------------------------------------------------
 python/pyspark/mllib/linalg/__init__.py | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/95b6a810/python/pyspark/mllib/linalg/__init__.py
----------------------------------------------------------------------
diff --git a/python/pyspark/mllib/linalg/__init__.py b/python/pyspark/mllib/linalg/__init__.py
index 380f86e..4829acb 100644
--- a/python/pyspark/mllib/linalg/__init__.py
+++ b/python/pyspark/mllib/linalg/__init__.py
@@ -399,6 +399,10 @@ class DenseVector(Vector):
     def toArray(self):
         return self.array
 
+    @property
+    def values(self):
+        return self.array
+
     def __getitem__(self, item):
         return self.array[item]
 


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


Mime
View raw message