interlace

emlib.numpytools.interlace(*arrays)[source]

Interleave multiple arrays into a flat array in the form

Example:

A = [a0, a1, a2, ...]
B = [b0, b1, b2, ...]
C = [c0, c1, c2, ...]
interlace(A, B, C)
-> [a0, b0, c0, a1, b1, c1, ...]
Parameters:

*arrays (ndarray) – the arrays to interleave. They should be 1D arrays of the same length

Return type:

ndarray

Returns:

a 1D array with the elements of the given arrays interleaved