When I use the indices once to change the values, it works. However, when I use the indices twice to change the values, nothing has changed. Why I can't use the indices twice to change the values?
import numpy as np
a = np.arange(100)
a[np.array([10,20,30,40,50])] = 1
print(a[np.array([10,20,30,40,50])])
# array([1, 1, 1, 1, 1]) which can be modified as 1
a = np.arange(100)
(a[np.array([10,20,30,40,50])])[np.array([1,2,3])] = 1
print((a[np.array([10,20,30,40,50])])[np.array([1,2,3])])
# array([20, 30, 40]) which can not be modified as 1