From 21bae355349be5e9b9e2b418570059842344c7c5 Mon Sep 17 00:00:00 2001 From: Yanbo Liang Date: Thu, 25 Jun 2015 09:55:18 +0800 Subject: [PATCH] remove duplicate code --- python/pyspark/mllib/clustering.py | 3 --- 1 file changed, 3 deletions(-) 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):