(self)
return iter(clusters)
Iterates over the clusters in this clustering.

        This method will return a generator that generates the clusters
        one by one.
Iterates over the clusters in this clustering.
Iterates over the clusters in this clustering .
def __iter__(self):
        """Iterates over the clusters in this clustering.

        This method will return a generator that generates the clusters
        one by one."""
        clusters = [[] for _ in range(self._len)]
        for idx, cluster in enumerate(self._membership):
            clusters[cluster].append(idx)
        return iter(clusters)
def __iter__ ( self ) : clusters = [ [ ] for _ in range ( self . _len ) ] for idx , cluster in enumerate ( self . _membership ) : clusters [ cluster ] . append ( idx ) return iter ( clusters )