I have the following arrays.
b0 = np.zeros((2, 3, 4))
array([[[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0]],
[[0, 0, 0, 0],
[0, 0, 0, 0],
[0, 0, 0, 0]]])
b1 = np.array([
[1, 0, 2],
[0, 0, 1]
])
b2 = np.array([
[100, 0, 0],
[200, 300, 0]
])
My goal is to update values of b0 using indices specified in b1 and new values given by b2. Specifically, I want to make these updates
b0[0, 0, b1[0,0]] = b2[0,0]
b0[0, 1, b1[0,1]] = b2[0,1]
b0[0, 2, b1[0,2]] = b2[0,2]
b0[1, 0, b1[1,0]] = b2[1,0]
b0[1, 1, b1[1,1]] = b2[1,1]
b0[1, 2, b1[1,2]] = b2[1,2]
b0
array([[[ 0, 100, 0, 0],
[ 0, 0, 0, 0],
[ 0, 0, 0, 0]],
[[200, 0, 0, 0],
[300, 0, 0, 0],
[ 0, 0, 0, 0]]])
How do I do this dynamically?