Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. a = np.arange(3*4*5*6).reshape((3, 4, 5, 6))
  2. a.shape
  3.  
  4. Out[3]: (3, 4, 5, 6)
  5.  
  6. a[0, :, :, [0, 1]].shape
  7.  
  8. Out[4]: (2, 4, 5)
  9.  
  10. a[0, :, [0, 1], :].shape
  11.  
  12. Out[5]: (2, 4, 6)
  13.  
  14. a[:, :, :, [0, 1]].shape
  15.  
  16. Out[6]: (3, 4, 5, 2)
  17.  
  18. a[0, :, :, :,][:, :, [0, 1]].shape
  19.  
  20. Out[24]: (4, 5, 2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement