I have a numpy matrix X with n columns, and I have a list I of n lists of indices i, and a corresponding list V of n lists of values v. For each column c in X, I want to assign the indices I[c] to the values V[c]. Is there a way to do this without a for loop, i.e.:
n = 3
X = np.zeros((4,n))
I = [[0,1],[1,2,3],[0]]
V = [[1,1],[2,2,2],[3]]
for c in range(n):
X[I[c],c] = V[c]