The general format is arr_2d[row][col] or arr_2d[row,col]. recommended
is comma notation for clarity
假设我有一个numpy数组
arr_2d = np.arange(0,9).reshape((3,3))
arr_2d[:,0] # in row form but the data will be of the column.
>> array([0, 3, 6])
那么如何使用括号表示法访问第一列。
Tags:
这不是第一栏吗???它给出了[0,3,6],对吗
相关问题 更多 >
编程相关推荐