Last active
July 24, 2020 18:46
-
-
Save schlameel/2ee338c35c72bedcdda58dcb121f2786 to your computer and use it in GitHub Desktop.
Interleave data using numpy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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