diff options
author | Vinod K C <vinod.kc@huawei.com> | 2015-09-15 23:25:51 -0700 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2015-09-15 23:25:51 -0700 |
commit | 95b6a8103fb527f501ca26b1d6e3a5859970a1e2 (patch) | |
tree | 98edb7e4e5955168e2f7939eddc940b021e2d67b /python/pyspark/mllib | |
parent | b921fe4dc0442aa133ab7d55fba24bc798d59aa2 (diff) | |
download | spark-95b6a8103fb527f501ca26b1d6e3a5859970a1e2.tar.gz spark-95b6a8103fb527f501ca26b1d6e3a5859970a1e2.tar.bz2 spark-95b6a8103fb527f501ca26b1d6e3a5859970a1e2.zip |
[SPARK-10516] [ MLLIB] Added values property in DenseVector
Author: Vinod K C <vinod.kc@huawei.com>
Closes #8682 from vinodkc/fix_SPARK-10516.
Diffstat (limited to 'python/pyspark/mllib')
-rw-r--r-- | python/pyspark/mllib/linalg/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python/pyspark/mllib/linalg/__init__.py b/python/pyspark/mllib/linalg/__init__.py index 380f86e9b4..4829acb16e 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] |