python 矩阵转置

Posted easyidea

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python 矩阵转置相关的知识,希望对你有一定的参考价值。

python矩阵转置的两种方法

Set=np.mat([[1,2,3],[4,5,6],[7,8,9]])
print("原矩阵",Set)
print("转置1\n",Set.T)
print("转置2\n",np.transpose(Set))

 

以上是关于python 矩阵转置的主要内容,如果未能解决你的问题,请参考以下文章