Here is the code:
#new_right_v2 = []
for i in range(rows):
r1_p5_first_half = np.concatenate( (new_right[i,:312].reshape(1,-1), new_right[i,625:937].reshape(1,-1), new_right[i,1250:1562].reshape(1,-1), new_right[i,1875:2187].reshape(1,-1)),axis=1)
#print(r1_p5_first_half.shape)
r1_p5_second_half = np.concatenate( (new_right[i,313:625].reshape(1,-1), new_right[i,938:1250].reshape(1,-1), new_right[i,1563:1875].reshape(1,-1), new_right[i,2187:2499].reshape(1,-1)),axis=1)
new_right_v2.append(r1_p5_first_half)
new_right_v2.append(r1_p5_second_half)
new_right_v2
But when I run to check dimensions:
for i in range(40):
print(new_right_v2[i].shape)
This output comes: (2, 1248) (2, 1248) (2, 1248) (2, 1248) (2, 1248) (2, 1248) (2, 1248) (2, 1248) (2, 1248) (2, 1248) (2, 1248) (2, 1248) (2, 1248) (2, 1248) (2, 1248) (2, 1248) (2, 1248) (2, 1248) (2, 1248) (2, 1248) (4, 624) (4, 624) (4, 624) (4, 624) (4, 624) (4, 624) (4, 624) (4, 624) (4, 624) (4, 624) (4, 624) (4, 624) (4, 624) (4, 624) (4, 624) (4, 624) (4, 624) (4, 624) (4, 624) (4, 624)
I don't know what happens after 10th iteration. Any idea?