Advertisement
Guest User

Untitled

a guest
Oct 9th, 2015
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. ma = [[0.343, 0.351, 0.306], [0.145, 0.368, 0.487]]
  2.  
  3. [0.343,0.145, 0.351,0.368, 0.306, 0.487]
  4.  
  5. a = np.array(ma)
  6. print a.shape
  7. c = a.reshape(3,2,order='F')
  8. print c
  9.  
  10. [[ 0.343 0.368]
  11. [ 0.145 0.306]
  12. [ 0.351 0.487]]
  13.  
  14. [[0.404,0.571,0.025],[0.076,0.694,0.23],[0.606, 0.333,0.061],[0.595,0.267,0.138]]
  15.  
  16. [0.404,0.076,0.606,.595, 0.571,0.694,0.333, .267, .025,.23,.061,.138]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement