numpy 矩阵转置
时间: 2023-09-02 17:10:33 浏览: 145
numpy中可以使用transpose函数来进行矩阵的转置操作。转置操作可以将矩阵的行变为列,列变为行。对于一个二维矩阵A,可以使用A.T或者np.transpose(A)来实现转置操作。例如,对于矩阵A=\[\[1,2,3\],\[4,5,6\],\[7,8,9\]\],可以使用A.T或者np.transpose(A)来得到转置后的矩阵。转置后的矩阵B=\[\[1,4,7\],\[2,5,8\],\[3,6,9\]\]。\[1\]\[2\]
#### 引用[.reference_title]
- *1* *2* [python实现矩阵转置的几种方法](https://blog.csdn.net/qq_34243930/article/details/108524383)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [Numpy实现矩阵转置的几种方法](https://blog.csdn.net/cxx654/article/details/105762091)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insert_down1,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文