title: what is meaning of using probs[range(6),y]
body: <p>A python 2d numpy-array <code>probs</code> has the shape <code>(6,3)</code>, another 1d array <code>y</code> has a shape <code>(6,)</code>. what is the meaning of <code>probs[range(6),y]</code>?</p>
  
  <p>For example:</p>
  
  <pre><code>import numpy as np
  
  probs=np.array([[  1.,   2.,   3.],
                  [  1.,   3.,   5.],
                  [  1. ,  4.,   7.],
                  [  1.,   5.,   9.],
                  [  1.,   6.,  11.],
                  [  1.,   7.,  13.]])
  
  y= [0, 0, 1, 1, 2, 2]
  
  probs[range(6),y]
  </code></pre>
  
  <p>Which rule is used here?</p>