Tuesday, 27 August 2013

Reshape the numpy.array specially

Reshape the numpy.array specially

I have a array like following,
from numpy import *
a=array[1,2,3,4,5,6,7,8,9]
I want to get the result like following
[[1,4,7],[2,5,8],[3,6,9]]
Because I have a big array. So i need a efficient way to do it . And it's
better to reshape it in-place.

No comments:

Post a Comment