You can grab indices and using vstack and ravel get desired result:
import numpy as np arr = np.array([[0, 0, -1], [0, 0, -1], [0, 0, 0], [0, 0, 0], [0, 0, 1], [0, 0, 1]]) arr_2 = np.vstack((arr[::2].ravel(), arr[1::2].ravel())) # arr_2 [[ 0 0 -1 0 0 0 0 0 1] [ 0 0 -1 0 0 0 0 0 1]]But this feels too brute-force. Therefore alternative could be preferred:
arr_3 = arr.reshape(-1, 2, 3).swapaxes(0, 1).reshape(2, -1)
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.