title: Numpy: sorting matrix like list of lists, or: sort matrix by rows
body: <p>I have a <code>numpy</code> matrix that contains row vectors.  I want to sort the matrix by its rows, like Python would sort a list of lists:</p>
  
  <pre><code>import numpy as np
  def sortx(a):
      return np.array(sorted([list(i) for i in a]))
  
  a = np.array([[1,4,0,2],[0,2,3,1]])
  print(sortx(a))
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>[[0 2 3 1]
   [1 4 0 2]]
  </code></pre>
  
  <p>Is there a <code>numpy</code> equivalent of my <code>sortx()</code> function so I don't have to convert the data twice?</p>