(self, *args)
return counts
Returns the size of given clusters.

        The indices are given as positional arguments. If there are no
        positional arguments, the function will return the sizes of all clusters.
Returns the size of given clusters.
Returns the size of given clusters .
def sizes(self, *args):
        """Returns the size of given clusters.

        The indices are given as positional arguments. If there are no
        positional arguments, the function will return the sizes of all clusters.
        """
        counts = [0] * len(self)
        for x in self._membership:
            counts[x] += 1

        if args:
            return [counts[idx] for idx in args]

        return counts
def sizes ( self , * args ) : counts = [ 0 ] * len ( self ) for x in self . _membership : counts [ x ] += 1 if args : return [ counts [ idx ] for idx in args ] return counts