I am trying to obtain the value corresponding to column b[i] for each row i in A
Can I do this without using the for loop?
A = np.array([[35, 2, 23, 22], [44, 21, 15, 4], [44, 21, 15, 4], [37, 4, 17, 41], [33, 4, 4, 18], [35, 2, 23, 22]])
b = np.array([0,1,1,2,3,0])
C = zeros(len(b),1)
for i in range(6):
C[i] = A[i][b[i]]