title: How to rearrange array based upon index array
body: <p>I'm looking for a one line solution that would help me do the following. </p>
  
  <p>Suppose I have</p>
  
  <pre><code>array = np.array([10, 20, 30, 40, 50])
  </code></pre>
  
  <p>I'd like to rearrange it based upon an input ordering. If there were a numpy function called <code>arrange</code>, it would do the following:</p>
  
  <pre><code>newarray = np.arrange(array, [1, 0, 3, 4, 2])
  print newarray
  
      [20, 10, 40, 50, 30]
  </code></pre>
  
  <p>Formally, if the array to be reordered is m x n, and the "index" array is 1 x n, the ordering would be determined by the array called "index".</p>
  
  <p>Does numpy have a function like this?</p>