diff --git a/pyFTS/partitioners/KMeans.py b/pyFTS/partitioners/KMeans.py index 1017ba3..e97dd26 100644 --- a/pyFTS/partitioners/KMeans.py +++ b/pyFTS/partitioners/KMeans.py @@ -87,9 +87,9 @@ class KMeansPartitioner(partitioner.Partitioner): kwargs = {'type': self.type, 'variable': self.variable} centroides = k_means(self.partitions, data, 1) - centroides = [v[0] for v in centroides] centroides.append(self.max) centroides.append(self.min) + centroides = list(set(centroides)) centroides.sort() for c in range(1, len(centroides) - 1): _name = self.get_name(c)