title: Understanding weird boolean 2d-array indexing behavior in numpy
body: <p>Why does this work:</p>
  
  <pre><code>a=np.random.rand(10,20)
  x_range=np.arange(10)
  y_range=np.arange(20)
  
  a_tmp=a[x_range&lt;5,:]
  b=a_tmp[:,np.in1d(y_range,[3,4,8])]
  </code></pre>
  
  <p>and this does not:</p>
  
  <pre><code>a=np.random.rand(10,20)
  x_range=np.arange(10)
  y_range=np.arange(20)    
  
  b=a[x_range&lt;5,np.in1d(y_range,[3,4,8])]
  </code></pre>