title: Find the index of the k smallest values of a numpy array
body: <p>In order to find the index of the smallest value, I can use <code>argmin</code>: </p>
  
  <pre><code>import numpy as np
  A = np.array([1, 7, 9, 2, 0.1, 17, 17, 1.5])
  print A.argmin()     # 4 because A[4] = 0.1
  </code></pre>
  
  <p></p>
  But how can I find the indices of the <strong>k-smallest values</strong>?</p>
  
  <p>I'm looking for something like:</p>
  
  <pre><code>print A.argmin(numberofvalues=3)   
  # [4, 0, 7]  because A[4] &lt;= A[0] &lt;= A[7] &lt;= all other A[i]
  </code></pre>
  
  <p></p></p>
  
  <p><em>Note: in my use case A has between ~ 10 000 and 100 000 values, and I'm interested for only the indices of the k=10 smallest values. k will never be > 10.</em></p>