标签: python numpy vectorization
如何以向量化方式对numpy执行以下操作?
A=np.array([[1,2,3],[3,2,1],[5,4,6]]) index = [0,2,1] value = [7,8,9] for i, x in enumerate(index): A[i][x] = value[i]