title: Can this numpy.where() approach be adapted for two conditions instead of one?
body: <p>I can get <code>numpy.where()</code> to work for one condition but not two conditions.</p>
  
  <p><strong>For one condition:</strong></p>
  
  <pre><code>import numpy as np
  
  a = np.array([1, 2, 3, 4, 5, 1, 2, 3, 1, 2, 1, 1, 1, 2, 4, 5])
  i, = np.where(a &lt; 2)
  print(i)
  &gt;&gt; [ 0  5  8 10 11 12] ## indices where a[i] = 1
  </code></pre>
  
  <p><strong>For two conditions:</strong></p>
  
  <pre><code># condition = (a &gt; 1 and a &lt; 3)
  # i, = np.where(condition)
  i, = np.where(a &gt; 1 and a &lt; 3)
  print(i)
  &gt;&gt; ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
  </code></pre>
  
  <p>I read up on <code>a.any()</code> and <code>a.all()</code> <a href="https://stackoverflow.com/questions/40820779/how-to-use-numpy-all-or-numpy-any/40821064#40821064">in this other SO post</a>, but this doesn't work for my purpose since I want all indices that fit the condition rather than a single boolean value.</p>
  
  <p>Is there a way to adapt this for two conditions?</p>