transepose 矩阵的转置
转置有两种用法 transepose 和x.T
x = np.arange(9).reshape((3,3))
x
Out[314]:array([[0, 1, 2],
[3, 4, 5],
[6, 7, 8]])
np.transpose(x)
Out[315]:
array([[0, 3, 6],
[1, 4, 7],
[2, 5, 8]])
print(x.T)
[[0 3 6]
[1 4 7]
[2 5 8]
转置有两种用法 transepose 和x.T
x = np.arange(9).reshape((3,3))
x
Out[314]:[2, 5, 8]])
print(x.T)
[[0 3 6]
[1 4 7]
[2 5 8]