title: Numpy where function multiple conditions
body: <p>I have an array of distances called <code>dists</code>. I want to select <code>dists</code> which are within a range.</p>
  <pre><code> dists[(np.where(dists &gt;= r)) and (np.where(dists &lt;= r + dr))]
  </code></pre>
  <p>However, this selects only for the condition</p>
  <pre><code> (np.where(dists &lt;= r + dr))
  </code></pre>
  <p>If I do the commands sequentially by using a temporary variable it works fine. Why does the above code not work, and how do I get it to work?</p>