title: Efficiently sorting a numpy array in descending order?
body: <p>I am surprised this specific question hasn't been asked before, but I really didn't find it on SO nor on the documentation of <code>np.sort</code>.</p>
  
  <p>Say I have a random numpy array holding integers, e.g:</p>
  
  <pre><code>&gt; temp = np.random.randint(1,10, 10)    
  &gt; temp
  array([2, 4, 7, 4, 2, 2, 7, 6, 4, 4])
  </code></pre>
  
  <p>If I sort it, I get ascending order by default:</p>
  
  <pre><code>&gt; np.sort(temp)
  array([2, 2, 2, 4, 4, 4, 4, 6, 7, 7])
  </code></pre>
  
  <p>but I want the solution to be sorted in <strong>descending</strong> order.</p>
  
  <p>Now, I know I can always do:</p>
  
  <pre><code>reverse_order = np.sort(temp)[::-1]
  </code></pre>
  
  <p>but is this last statement <strong>efficient</strong>? Doesn't it create a copy in ascending order, and then reverses this copy to get the result in reversed order? If this is indeed the case, is there an efficient alternative? It doesn't look like <code>np.sort</code> accepts parameters to change the sign of the comparisons in the sort operation to get things in reverse order.</p>