>>> a = np.arange(6).reshape(2,3) >>> for x in np.nditer(a.T): ...     print(x, end=' ') ... 0 1 2 3 4 5 

Read more of this post