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