可以使用NumPy的`transpose()`方法來對數(shù)組進(jìn)行轉(zhuǎn)置操作。示例如下:
```python
import numpy as np
arr = np.array([[1, 2, 3], [4, 5, 6]])
arr_transposed = np.transpose(arr)
print(arr_transposed)
```
輸出結(jié)果為:
[[1 4]
[2 5]
[3 6]]
億速云公眾號
手機(jī)網(wǎng)站二維碼
Copyright ? Yisu Cloud Ltd. All Rights Reserved. 2018 版權(quán)所有
廣州億速云計(jì)算有限公司粵ICP備17096448號-1 粵公網(wǎng)安備 44010402001142號增值電信業(yè)務(wù)經(jīng)營許可證編號:B1-20181529