title: Numpy - difference when using np.isnan directly and saving booleans in a temp. variable
body: <p>I want to remove NaN from a numpy array along the lines, exemple :</p>
  
  <pre><code>A = np.array([[1,2,3,4,5,6],
         [1,2,3,4,5,6],
         [1,2,3,4,nan,6],
         [1,2,3,4,5,6],
         [1,2,3,4,5,6],
         [1,2,3,4,5,6],
         [1,2,nan,4,5,6],
         [1,2,3,4,5,6],
         [nan,2,3,4,5,6]])
  </code></pre>
  
  <p>I remove them using a direct command, and it works fine :</p>
  
  <pre><code>A1 = A[~np.isnan(A).any(1)]
  </code></pre>
  
  <p>But if I save the booleans values in a temporary array :</p>
  
  <pre><code>boolAnonan = ~np.isnan(A)  
  A2 = A[boolAnonan.any(1)]
  </code></pre>
  
  <p>It change nothing ! </p>
  
  <p>In fact, why get I this ? :</p>
  
  <pre><code>&gt;&gt;&gt; boolAnonan == ~np.isnan(A)
  array([[ True,  True,  True,  True,  True,  True],
     [ True,  True,  True,  True,  True,  True],
     [ True,  True,  True,  True,  True,  True],
     [ True,  True,  True,  True,  True,  True],
     [ True,  True,  True,  True,  True,  True],
     [ True,  True,  True,  True,  True,  True],
     [ True,  True,  True,  True,  True,  True],
     [ True,  True,  True,  True,  True,  True],
     [ True,  True,  True,  True,  True,  True]], dtype=bool)
  
  &gt;&gt;&gt; ~np.isnan(A).any(1)
  array([ True,  True, False,  True,  True,  True, False,  True, False], dtype=bool)
  
  &gt;&gt;&gt; boolAnonan.any(1)
  array([ True,  True,  True,  True,  True,  True,  True,  True,  True], dtype=bool)
  </code></pre>
  
  <p>Any logical explanation ? Thanks !</p>