一、数组的轴
二维数组有两个轴,轴索引分别为0和1
二、数组转置
我们可以使用数组对象的属性T,将数组进行转置。
import numpy as np
lt = [[1, 3, 5],
[2, 4, 6]]
a = np.array(lt)
print(a)
b = a.T
print(b)
0轴索引就是行,1轴索引是列;数轴的转置T:b=a.T
转置 - T
二维数组有两个轴,轴索引分别是0和1
ddddd