The transpose of a matrix can be obtained by interchanging its rows and columns.
# Matrix transpose
matrix = np.array([[1, 2, 3], [4, 5, 6]])
matrix_transpose = np.transpose(matrix)
# matrix_transpose = matrix.T # Equivalent using the .T attribute
print(matrix_transpose)