ReactSeq / onmt /tests /utils_for_tests.py
Oopstom's picture
Upload 313 files
c668e80 verified
raw
history blame
185 Bytes
import itertools
def product_dict(**kwargs):
keys = kwargs.keys()
vals = kwargs.values()
for instance in itertools.product(*vals):
yield dict(zip(keys, instance))