title: Replace multiple elements in numpy array with 1
body: <p>In a given numpy array <code>X</code>:</p>
  
  <pre><code>X = array([1,2,3,4,5,6,7,8,9,10])
  </code></pre>
  
  <p>I would like to replace indices <code>(2, 3)</code> and <code>(7, 8)</code> with a single element <code>-1</code> respectively, like:</p>
  
  <pre><code>X = array([1,2,-1,5,6,7,-1,10])
  </code></pre>
  
  <p>In other words, I replaced values at indices <code>(2, 3)</code> and <code>(7,8)</code> of the original array with a singular value. </p>
  
  <p>Question is: Is there a numpy-ish way (i.e. without for loops and usage of python lists) around it? Thanks.</p>
  
  <p>Note: This is NOT equivalent of replacing a single element in-place with another. Its about replacing multiple values with a "singular" value. Thanks.</p>