title: Replacing an element in a list of array?
body: <p>I have a list like this:</p>
  
  <pre><code>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.])]
  </code></pre>
  
  <p>and then I declare another list:</p>
  
  <pre><code>y = [2, 8]
  </code></pre>
  
  <p>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?</p>
  
  <p>So the desired output should be like this:</p>
  
  <pre><code>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.])]
  </code></pre>