📜  numpy 数组 [-1] - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:17.338000             🧑  作者: Mango

代码示例1
print(b)
>>array([[ 0,  1,  2,  3],
       [10, 11, 12, 13],
       [20, 21, 22, 23],
       [30, 31, 32, 33],
       [40, 41, 42, 43]])

print(b[-1])       # the last row. Equivalent to b[-1,:]
>>array([40, 41, 42, 43])