title: How to Replace multiple pixels with each numbers in numpy?
body: <p>I have two np-array and one list like this.</p>
  <pre><code>import numpy as np
  
  x = np.array([[1,2,3],[4,5,6],[7,8,9]])
  y = np.ones((3,3))
  idx = [[1,1],[2,2]]
  </code></pre>
  <pre><code>x
  &gt;&gt;&gt; array([[1, 2, 3],
         [4, 5, 6],
         [7, 8, 9]])
  y
  &gt;&gt;&gt; array([[1., 1., 1.],
         [1., 1., 1.],
         [1., 1., 1.]])
  </code></pre>
  <p>I would like to get z array like this.</p>
  <pre><code>z
  &gt;&gt;&gt; array([[1., 1., 1.],
         [1., 5., 1.],
         [1., 1., 9.]])
  </code></pre>
  <p>Like above z array, i would like to replace index index of <code>y</code> in <code>idx</code> with index index of <code>x</code> in <code>idx</code> by <em><strong>not</strong></em> using <code>for-loop</code>.</p>
  <p>If I use for loop, I can do it like this.</p>
  <pre><code>for i in range(len(idx)): 
      y[idx[i][0]][idx[i][1]] = x[idx[i][0]][idx[i][1]] 
  </code></pre>
  <p>Actually, this is easy example, but I have bigger array, so if I use for-loop, this takes much time.</p>
  <p>HOW TO DO?</p>