

def product(parameter):
    keys = sorted(parameter)
    values = [parameter[key] for key in keys]
    values_product = itertools.product(*values)
    return [dict(zip(keys, vals)) for vals in values_product]

dataset/ETHPy150Open pfnet/chainer/chainer/testing/parameterized.py product/original