I have a list like this:
x = [array([ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10.]),
array([ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 10.])]
and then I declare another list:
y = [2, 8]
How can I replace an element in the first list if the value equals to 2 (or in index of y[0]) with 0? And do the same thing on the second list, which I should replace the value 8 with 0?
So the desired output should be like this:
x = [array([ 0., 1., 0., 3., 4., 5., 6., 7., 8., 9., 10.]),
array([ 0., 1., 2., 3., 4., 5., 6., 7., 0., 9., 10.])]