我知道Python列表有一种方法可以返回第一个索引:
>>> l = [1, 2, 3] >>> l.index(2) 1
NumPy阵列有类似的东西吗?
python arrays numpy
arrays ×1
numpy ×1
python ×1