title: Is it possible to sort Numpy 2D array like dictionary characters are matching
body: <p>I would like to sort them as given below:</p>
  
  <ol>
  <li>First it will check '0th' col &amp; if all values are different, then it will sort by interchanging the rows up &amp; down.</li>
  <li>If '0th' column contains same values, then it will place them consecutive rows &amp; sorting depends on the value of 1st col. If further matches, process continues f</li>
  <li>As the row index 2 &amp; 3 have the same values in 0, 1, 2 the column. So by checking at 3rd col it decides the position of row for these two rows. Please help. Thanks in advance.
  NB: As we compare words in dictionary to search, I also want to compare like that.</li>
  </ol>
  
  <p>Input Array:</p>
  
  <pre><code>[23.339,    0.015,  0.008,  0.0071,     0.079,  0.001]
  [20.759,    0.024,  0.020,  0.0161,     0.1282, 0.030]
  [17.352,    0.063,  0.024,  0.0187,     0.1484, 0.039]
  [17.352,    0.063,  0.024,  0.008,  0.128,  0.035]
  [23.339,    0.015,  0.001,  0.204,  1.819,  0.762]
  [17.352,    1.645,  1.045,  0.779,  1.106,  0.821]
  [14.556,    0.061,  0.058,  0.0071,     0.1016, 0.005]
  </code></pre>
  
  <p>Output Array:</p>
  
  <pre><code>[14.556,    0.061,  0.058,  0.0071,     0.1016, 0.005]
  [**17.352,  0.063,  0.024,**    0.008,  0.128,  0.035]
  [**17.352,  0.063,  0.024,**    0.0187,     0.1484, 0.039]
  [17.352,    1.645,  1.045,  0.779,  1.106,  0.821]
  [20.759,    0.024,  0.020,  0.0161, 0.1282, 0.030]
  [**23.339,  0.015,**    0.001,  0.204,  1.819,  0.762]
  [**23.339,  0.015,**    0.008,  0.0071, 0.079,  0.001]
  </code></pre>