every one. i want to split an array using numpy. Though i know the syntax but dimensions and axis always confuses me. So if you can give some tips and explanation, i will be thankful to you.
Let say there is a video with shape
(128,224,224,3)
. 128 is the number of frames in the video.
Now i want to split this video into multiple videos such that each videos has 32 frames.
I do this following
video.reshape(len(video)//32,-1,3,224,224)
so the new shape is (4,32,224,224,3)
.
Which mean that the whole video is spli into 4 parts.
The first part has first 32 frame, second part has 32 to 64 frames, third part has 64 to 96 frames as so on.
But i am confused about the order of frames.
Some time i think the syntax should be
video.reshape(32,-1,3,224,224)
which result in same of (32,4,3,224,224)
But i am not sure which one is correct.
Looking for some intuitive answer, though i think first ones correct, but it confuses me always.