Simply use: import numpy as np indexarray = np.array([[0, 2, 4, 6], [1, 3, 5, 7]]) values = [1, 2, 3, 4] rows, cols = indexarray[0], ...
確定! 回上一頁