1、引入 numpy库
import numpy
2、测试矩阵编写
matrix = [[1,2,3],
3、转化为矩阵
mat=numpy.matrix(matrix)
4、使用 T方法 转置 即可实现行列转换