listMergeGen

utils.listMergeGen(*args)[source]

Fast merging of lists of numbers

Parameters:args (list of lists of numbers) – A list of 1D lists of numbers
Yields:combination (numpy.array of 1 x len(args)) – Array of all combinations

Examples

>>> for i in listMergeGen(0.7): print(repr(i))
array([0.7])
>>> for i in listMergeGen([0.7, 0.1]): print(repr(i))
array([0.7])
array([0.1])
>>> for i in listMergeGen([0.7, 0.1], [0.6]): print(repr(i))
array([0.7,  0.6])
array([0.1,  0.6])
>>> for i in listMergeGen([0.7, 0.1], []): print(repr(i))
>>> for i in listMergeGen([0.7, 0.1], 0.6): print(repr(i))
array([0.7,  0.6])
array([0.1,  0.6])