title: Find indices of the elements smaller than x in a numpy array
body: <p>Assuming that I have a numpy array such as:</p>
  
  <pre><code>import numpy as np    
  arr = np.array([10,1,2,5,6,2,3,8])
  </code></pre>
  
  <p>How could I extract an array containing the indices of the elements smaller than 6 so I get the following result:</p>
  
  <pre><code>np.array([1,2,3,5,6])
  </code></pre>
  
  <p>I would like something that behave like <a href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.nonzero.html" rel="nofollow noreferrer">np.nonzero()</a> but instead of testing for nonzero value, it test for value smaller than x</p>