title: NumPy chained comparison with two predicates
body: <p>In NumPy, I can generate a boolean array like this:</p>
  <pre><code>&gt;&gt;&gt; arr = np.array([1, 2, 1, 2, 3, 6, 9])
  &gt;&gt;&gt; arr &gt; 2
  array([False, False, False, False,  True,  True,  True], dtype=bool)
  </code></pre>
  <p>How can we chain comparisons together? For example:</p>
  <pre><code>&gt;&gt;&gt; 6 &gt; arr &gt; 2
  array([False, False, False, False,  True,  False,  False], dtype=bool)
  </code></pre>
  <p>Attempting to do so results in the error message</p>
  <blockquote>
  <p>ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()</p>
  </blockquote>