title: Python: what's an elegant way to select specific rows of an 2-d array into a new array?
body: <p>For example, given a python numpy.ndarray <code>a = array([[1, 2], [3, 4], [5, 6]])</code>, I want to select the 0th and 2nd row of array <code>a</code> into a new array <code>b</code>, such that <code>b</code> becomes <code>array([[1,2],[5,6]]</code>.</p>
  
  <p>I need to solution to work on more general problems, where the original 2d array can have more rows and I should be able to select the rows based on some disjoint ranges. In general, I was looking for something like <code>a[i:j] + a[k:p]</code> that works for 1-d list, but it seems 2d-arrays won't add up this way.</p>
  
  <p><strong>update</strong>
  It seems that I can use <code>vstack((a[i:j], a[k:p]))</code> to get this working, but is there any elegant way to do this?</p>