python np.transpose code example
Example 1: numpy transpose
>>> np.transpose(x)
array([[0, 2],
[1, 3]])
Example 2: transpose of a matrix using numpy
M = np.matrix([[1,2],[3,4]])
M.transpose()
>>> np.transpose(x)
array([[0, 2],
[1, 3]])
M = np.matrix([[1,2],[3,4]])
M.transpose()