how to transpose a matrix in python using numpy code example
Example: transpose matrices numpy
import numpy as np
A = [1, 2, 3, 4]
np.array(A).T # .T is used to transpose matrix
import numpy as np
A = [1, 2, 3, 4]
np.array(A).T # .T is used to transpose matrix