title: Opencv or Numpy-- replace a list of pixels in an image, efficiently
body: <p>Hi OpenCV or Numpy Gurus, </p>
  
  <p>I've been searching to an answer to this, but I'm surprised to not find it here or elsewhere...</p>
  
  <p>I have a black image, and I want to replace a list of pixels (quite a large list) with a certain value.  In the future, the "certain value" will be a list of values, but for the moment, let's keep it simple.  </p>
  
  <p>Simplifying even further, I just use a 2-d array of single numbers below, instead of RGB values...
  So, this fairly inefficient approach works for this sort of thing:</p>
  
  <pre><code>a = np.zeros((5, 5,1))
  
  for i in np.asarray( ([2,3],[3,4]) ):
         a[i[0], i[1]] = 20
  </code></pre>
  
  <p>I was hoping there was a way to use <code>np.put</code> on a two dimensional array, where I don't rely on a python loop.</p>
  
  <p>Now I had the suggestion that I could use </p>
  
  <pre><code>a[ ([2,3],[3,4]) = 20
  </code></pre>
  
  <p>However I notice when I use this approach in my real OpenCV problem it does not work.  This very inefficient approach does:</p>
  
  <pre><code>coords_list = ([3,5],[55,60],[25,90])
  black_image =np.zeros((480,640,3))
  for i in coords_list:
      black_image[i[1],i[0]] = [255,255,255]
  </code></pre>
  
  <p>I expect this is a simple question to many out there.</p>
  
  <p>Thanks!</p>