假设我有:
test = numpy.array([[1, 2], [3, 4], [5, 6]])
test[i]让我第i个阵列(例如线[1, 2]).我怎样才能访问第i列?(例如[1, 3, 5]).这也是一项昂贵的操作吗?
test[i]
[1, 2]
[1, 3, 5]
python arrays numpy
arrays ×1
numpy ×1
python ×1