I have a numpy array, arr, of shape(1000, 400, 56)
For context, 400 represents the time bins, 56 represents a motion vector. 1000 is the nr of samples
For each sample, I want to split the array (the 400, 56 part) in a grid like fashion. For example I want 4, 200, 28. Where the 28 part for each sample is from splitting the motion vector in half and placing it in one of the 4 samples separately (note in this case the time would have been split in half also).
The problem with doing reshape(4, 200, 28) is that it splits the 56 into x2 28 and places them right after the other consecutively (in the same sample array) which is undesired. I want the first half of the 56 to be in one sample array and the second half to be in another sample array such that the x56 motion vector is split in half.
What's the best way to do this?
arrand an example output after splitting.transposeorswapaxesto get a (1000,2,2,200,28). Then a final reshape.