title: Extract values that satisfy a condition from numpy array
body: <p>Say I have the following arrays:</p>
  
  <pre><code>a = np.array([1,1,1,2,2,2])
  b = np.array([4,6,1,8,2,1])
  </code></pre>
  
  <p>Is it possible to do the following:</p>
  
  <pre><code>a[np.where(b&gt;3)[0]]
  #array([1, 1, 2])
  </code></pre>
  
  <p>Thus select values from <code>a</code> according to the indices in which a condition in <code>b</code> is satisfied, but using exclusively <code>np.where</code> or a similar <code>numpy</code> function? </p>
  
  <p>In other words, can <code>np.where</code> be used specifying only an array from which to get values when the condition is <code>True</code>? Or is there another <code>numpy</code> function to do this in one step?</p>