how to take transpose of an array in python code example Example: numpy transpose >>> np.transpose(x) array([[0, 2], [1, 3]])