title: Vectorised code for selecting elements of a 2D array
body: <p>Well the following code obviously returns the element in position <code>ind</code> in matrix:</p>
  
  <pre><code>def select_coord(a,ind):
      return a[ind]
  </code></pre>
  
  <p>However I don't know how to vectorise this. In other words:</p>
  
  <pre><code>b=np.asarray([[2,3,4,5],[7,6,8,10]])
  indices=np.asarray([2,3])
  select_coord(b,indices)
  </code></pre>
  
  <p>Should return <code>[4,10]</code>.</p>
  
  <p>Which can be written with a for loop:</p>
  
  <pre><code>def new_select_record(a,indices):
      ret=[]
      for i in range a.shape[0]:
          ret.append(a[indices[i]])
      return np.asarray(ret)
  </code></pre>
  
  <p>Is there a way to write this in a vectorised manner?</p>