Reputation: 149
Sorry for this simple question, but I can't find how to figure it out :
I have a long 1D numpy array like:
[1,2,3,4,5,6,7,8,9,10,11,12, ... ,n1,n2,n3]
this array is used to store x y z position of points, like [x0,y0,z0,x1,y1,z1 etc.... ]
I would like to convert it to this form :
[ [1,2,3],[4,5,6],[7,8,9],[10,11,12],....,[n1,n2,n3] ]
It it possible with numpy without going through slow for loops ?
Thanks :)
Upvotes: 2
Views: 74