title: Python equivalent to Matlab [a,b] = sort(y)
body: <p>I am pretty new to the Python language and want to know how to the following</p>
  
  <pre><code>(1)  y = [some vector]
  (2)  z = [some other vector]
  (3)  [ynew,indx] = sort(y)
  (4)  znew = z(indx)
  </code></pre>
  
  <p>I can do lines 1,2 and 4 but line 3 is giving me fits.  Any suggestions.  What I am looking for is not a user written function but something intrinsic to the language itself.<br>
  Thanks</p>