bayespy.utils.misc.zipper_merge¶
- bayespy.utils.misc.zipper_merge(*lists)[source]¶
Combines lists by alternating elements from them.
Combining lists [1,2,3], [‘a’,’b’,’c’] and [42,666,99] results in [1,’a’,42,2,’b’,666,3,’c’,99]
The lists should have equal length or they are assumed to have the length of the shortest list.
This is known as alternating merge or zipper merge.