title: Numpy - Use values as index of another arrays
body: <p>I face a problem with Numpy, I try to use the values of each row (of B) as the indexes of another multidimensional array (A):</p>
  
  <pre><code>&gt;&gt;&gt; A
  array([[0, 1, 2],
         [3, 4, 5],
         [6, 7, 8]])
  &gt;&gt;&gt; B
      array([[ 0,  1,  2,  3],
             [ 1,  5,  6,  7],
             [ 8,  9, 10, 11]])
  &gt;&gt;&gt; np.clip(B, 0, 2)
      array([[0, 1, 2, 2],
             [1, 2, 2, 2],
             [2, 2, 2, 2]])
  </code></pre>
  
  <p>Here is the expected result:</p>
  
  <pre><code>array([[0, 1, 2, 2],
         [4, 5, 5, 5],
         [8, 8, 8, 8]])
  </code></pre>
  
  <p>Any idea ? Thanks a lot for your help.</p>