import numpy as np x = np.matrix([[1,2,3], [4,5,6]]) y = np.matrix([1,2,3,4,5,6]) print(x.T, y.T, sep='\n\n')