>>> a = np.array([[1, 2], [3, 4]]) >>> a array([[1, 2], [3, 4]]) >>> a.transpose() #or a.T array([[1, 3], [2, 4]])
>>> x = np.arange(4).reshape((2,2)) >>> x array([[0, 1], [2, 3]])