title: numpy argmax not working when value exceeds maximum in array
body: <pre><code>list_val = [ 30, 120, 240, 510]
  num = 900
  
  np.argmax(np.asarray(list_val) &gt; num)
  </code></pre>
  
  <p>I want to find the position of first element in array which is greater than <code>num</code></p>
  
  <p>The output from code above is 0. However, since 900 is greater than 510, the result should be 3. How can I fix it? </p>
  
  <p>--EDIT</p>
  
  <p>I want a solution that works if num is 20, 200 or 900.</p>