

def groupsizes_to_partition(*gsizes):
    '\n    >>> from logpy.assoccomm import groupsizes_to_partition\n    >>> groupsizes_to_partition(2, 3)\n    [[0, 1], [2, 3, 4]]\n    '
    idx = 0
    part = []
    for gs in gsizes:
        l = []
        for i in range(gs):
            l.append(idx)
            idx += 1
        part.append(l)
    return part

dataset/ETHPy150Open logpy/logpy/logpy/assoccomm.py groupsizes_to_partition/original