title: Filter an array in Python3 / Numpy and return indices
body: <p>Is there any built-in function in Python3/Numpy which filters an array and returns indices of the elements which are left? Something similar to numpy.argsort for sorting. The filter I have is setting both min and max thresholds - all values below/above min/max have to be filtered out.</p>
  
  <p>I've seen Python's function <a href="http://docs.python.org/py3k/library/functions.html#filter" rel="nofollow noreferrer">filter</a>, but I don't see a way to extract indices using it.</p>
  
  <p><strong>EDITED:</strong> Lots of useful information in the answers, thank you!</p>
  
  <p>As @SvenMarnach pointed out, mask is enough:</p>
  
  <pre><code>mask = (min_value &lt; a) &amp; (a &lt; max_value)
  </code></pre>
  
  <p>Now I have to apply this mask to other arrays of the same shape as <code>a</code>, but not sure what is the best way to do it...</p>