我想知道是否有更简洁的方法存储以下内容:
arr1 = arr[arr1inds]
arr2 = arr[arr2inds]
arr3 = arr[arr3inds]
arr4 = arr[arr4inds]
arr5 = arr[arr5inds]
arr6 = arr[arr6inds]
arr7 = arr[arr7inds]
答案 0 :(得分:1)
去二维:
arr2d = []
arr2d[1] = arr[arr1inds]
arr2d[2] = arr[arr2inds]
arr2d[3] = arr[arr3inds]
...