title: Sort a numpy array by another array, along a particular axis, using less memory
body: <p>From the answer to <a href="https://stackoverflow.com/q/6155649/513688">this question</a>, I learned how to sort the entries of one numpy array <code>a</code> by the values of another numpy array <code>b</code>, along a particular axis.</p>
  
  <p>However, this method requires the creation of several intermediate arrays that are the same size as <code>a</code>, one for each dimension of <code>a</code>. Some of my arrays are quite large, and this becomes inconvenient. Is there a way to accomplish the same goal that uses less memory?</p>