1

我想知道是否有更清洁的方法来存储以下内容:

arr1 = arr[arr1inds]
arr2 = arr[arr2inds]
arr3 = arr[arr3inds]
arr4 = arr[arr4inds]
arr5 = arr[arr5inds]
arr6 = arr[arr6inds]
arr7 = arr[arr7inds]
4

1 回答 1

1

去二维:

arr2d = []
arr2d[1] = arr[arr1inds]
arr2d[2] = arr[arr2inds]
arr2d[3] = arr[arr3inds]
...
于 2013-08-20T18:01:34.363 回答