Transpose

To take the transpose of the array M, we simply tack on a .T:

>>> Mtr = M.T
>>> print(Mtr)
array([[  1.,   2.,   3.,   4.,   5.],
       [ -2.,  -4.,  -6.,  -8., -10.],
       [  1.,   2.,   3.,   4.,   5.]])
>>> print(Mtr.shape)
(3, 5)

The numpy transpose function np.transpose(M) does the same thing.