def __iter__(self):
    'Iterates over the clusters in this clustering.\n\n        This method will return a generator that generates the clusters\n        one by one.'
    clusters = [[] for _ in xrange(self._len)]
    for (idx, cluster) in enumerate(self._membership):
        clusters[cluster].append(idx)
    return iter(clusters)
Iterates over the clusters in this clustering.

This method will return a generator that generates the clusters
one by one.
def __iter__(self):
    'Iterates over the clusters in this clustering.\n\n        This method will return a generator that generates the clusters\n        one by one.'
    clusters = [[] for _ in xrange(self._len)]
    for (idx, cluster) in enumerate(self._membership):
        clusters[cluster].append(idx)
    return iter(clusters)