Skip to content

Commit 20b3c68

Browse files
committed
python 3 fixes
1 parent 4d4e695 commit 20b3c68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/pyspark/mllib/clustering.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def computeCost(self, rdd):
110110
"""Return the K-means cost (sum of squared distances of points to their nearest center) for this
111111
model on the given data."""
112112
cost = callMLlibFunc("computeCostKmeansModel", rdd.map(_convert_to_vector),
113-
map(_convert_to_vector, self.centers))
113+
[_convert_to_vector(c) for c in self.centers])
114114
return cost
115115

116116
def save(self, sc, path):

0 commit comments

Comments
 (0)