,
(11, 22),
'My name is Kyles']# 索引第1项,索引为0In [16]: L[0]
Out[16]: [1, 2, 3]# 索引第1项的第2子项In [17]: L[0...# 索引第3项In [20]: L[2]
Out[20]: (11, 22)# 索引第3项,第一个元组In [22]: L[2][0]
Out[22]: 11# 索引第4项In [23]: L[3]
Out...[41]: []
看似简单的索引,有的人不以为然,我们这里采用精准的数字索引,很容易排查错误。...of bounds for axis 1 with size 3 # 根据 axis = 2 选取
In [75]: arr[:,:,0]
Out[75]:
array([[ 0, 5, 10],...我在工程中使用matlab的矩阵和python混合使用以上对象,出现最多就是shape不对应,index,columns 错误。