python_array[0][0]与array[00]的区别详解

qq_22508 25 0 PDF 2020-12-23 05:12:18

在学习python的时候, 看到有些 代码中使用array[0][0] 来提取位置元素 不太明白。 动手实验了一下 import numpy as np a = np.array([np.arange(12),np.arange(12,24)]) >>>print a [[ 0 1 2 3 4 5 6 7 8 9 10 11] [12 13 14 15 16 17 18 19 20 21 22 23]] >>>print a[0][6] 6 [0][6] means: get the 1st array and the 7th element. But what’s the diffe

用户评论
请输入评论内容
评分:
暂无评论