title: Access array elements by array/list of column indexes
body: <p>I have 2D array of integers (e.g. A with A.shape (10,5)) and 1D array of column indexes (which generally differ among each other) (e.g. idx with idx.shape (10,)). From i-th row, I would like to acquire the element from array A with column index idx[i]. What would be the best (fastest) solution if the desired output is 1D array of acquired elements or list of those elements?</p>
  
  <pre><code>A = np.arange(50).reshape(10,5)
  idx=np.array([2,4,0,0,3,1,3,1,2,4])
  </code></pre>
  
  <p>Desirable output:</p>
  
  <pre><code>output = [2,9,10,15,23,26,33,36,42,49]
  </code></pre>
  
  <p>or</p>
  
  <pre><code>output = np.array([2,9,10,15,23,26,33,36,42,49])
  </code></pre>