def groupsizes_to_partition(*gsizes):
    idx = 0
    part = []
    for gs in gsizes:
        l = []
        for i in range(gs):
            l.append(idx)
            idx += 1
        part.append(l)
    return part
>>> from logpy.assoccomm import groupsizes_to_partition
dataset/ETHPy150Open logpy/logpy/logpy/assoccomm.py/groupsizes_to_partition