title: Cannot understand numpy argpartition output
body: <p>I am trying to use arpgpartition from numpy, but it seems there is something going wrong and I cannot seem to figure it out. Here is what's happening:</p>
  
  <p>These are first 5 elements of the sorted array <code>norms</code></p>
  
  <pre><code>np.sort(norms)[:5]
  array([ 53.64759445,  54.91434479,  60.11617279,  64.09630585,  64.75318909], dtype=float32)
  </code></pre>
  
  <p>But when I use <code>indices_sorted = np.argpartition(norms, 5)[:5]</code></p>
  
  <pre><code>norms[indices_sorted]
  array([ 60.11617279,  64.09630585,  53.64759445,  54.91434479,  64.75318909], dtype=float32)
  </code></pre>
  
  <p>When I think I should get the same result as the sorted array?</p>
  
  <p>It works just fine when I use 3 as the parameter <code>indices_sorted = np.argpartition(norms, 3)[:3]</code></p>
  
  <pre><code>norms[indices_sorted]
  array([ 53.64759445,  54.91434479,  60.11617279], dtype=float32)
  </code></pre>
  
  <p>This isn't making much sense to me, hoping someone can offer some insight?</p>
  
  <p>EDIT: Rephrasing this question as whether argpartition preserves order of the k partitioned elements makes more sense.</p>