diff --git a/python/pyspark/mllib/clustering.py b/python/pyspark/mllib/clustering.py index 395c29304a61f..e6ef72942ce77 100644 --- a/python/pyspark/mllib/clustering.py +++ b/python/pyspark/mllib/clustering.py @@ -101,9 +101,6 @@ def k(self): def predict(self, x): """Find the cluster to which x belongs in this model.""" - if isinstance(x, RDD): - return x.map(lambda v: self.predict(v)) - best = 0 best_distance = float("inf") if isinstance(x, RDD):