title: How to modify the value of numpy array based on another array?
body: <p>I have a numpy array. I want to modify one array index by the chosen elements of another array. For example:</p>
  
  <pre><code>import numpy as np
  t1 = np.ones((10,3))
  t2 = np.arange(10)
  t1[np.where(t2&gt;5)][:,2] = 10
  print(t1)
  </code></pre>
  
  <p>What I want t1 is:</p>
  
  <pre><code>array([[1., 1., 1.],
         [1., 1., 1.],
         [1., 1., 1.],
         [1., 1., 1.],
         [1., 1., 1.],
         [1., 1., 1.],
         [1., 1., 10.],
         [1., 1., 10.],
         [1., 1., 10.],
         [1., 1., 10.]])
  </code></pre>
  
  <p>But the output of t1 is:</p>
  
  <pre><code>array([[1., 1., 1.],
         [1., 1., 1.],
         [1., 1., 1.],
         [1., 1., 1.],
         [1., 1., 1.],
         [1., 1., 1.],
         [1., 1., 1.],
         [1., 1., 1.],
         [1., 1., 1.],
         [1., 1., 1.]])
  </code></pre>
  
  <p>What the problem there?</p>