Skip to content

Instantly share code, notes, and snippets.



Last active Jul 24, 2020
What would you like to do?
Interleave data using numpy
import numpy as np
arr1 = np.zeros(100)
arr2 = np.ones(100)
arr_tuple = (arr1, arr2)
interleaved = np.vstack(arr_tuple).reshape((-1,), order='F')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.