From b77e420ed0d737e99c763cb7150949a0f0ec9e11 Mon Sep 17 00:00:00 2001 From: Vinod K C Date: Wed, 16 Sep 2015 11:56:05 +0530 Subject: [PATCH] Fixed review comment --- python/pyspark/mllib/linalg/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/python/pyspark/mllib/linalg/__init__.py b/python/pyspark/mllib/linalg/__init__.py index 4aa2fa4af4848..675af97c00c89 100644 --- a/python/pyspark/mllib/linalg/__init__.py +++ b/python/pyspark/mllib/linalg/__init__.py @@ -266,7 +266,6 @@ def __init__(self, ar): if ar.dtype != np.float64: ar = ar.astype(np.float64) self.array = ar - self.values = ar @staticmethod def parse(s): @@ -392,6 +391,10 @@ def squared_distance(self, other): def toArray(self): return self.array + @property + def values(self): + return self.array + def __getitem__(self, item): return self.array[item]