Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = np.arange(3*4*5*6).reshape((3, 4, 5, 6))
- a.shape
- Out[3]: (3, 4, 5, 6)
- a[0, :, :, [0, 1]].shape
- Out[4]: (2, 4, 5)
- a[0, :, [0, 1], :].shape
- Out[5]: (2, 4, 6)
- a[:, :, :, [0, 1]].shape
- Out[6]: (3, 4, 5, 2)
- a[0, :, :, :,][:, :, [0, 1]].shape
- Out[24]: (4, 5, 2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement