title: python fancy indexing with a boolean masked array
body: <p>I have a numpy masked array of data:</p>
  
  <pre><code>data = masked_array(data = [7 -- 7 1 8 -- 1 1 -- -- 3 -- -- 3 --],
                      mask = [False True False False False True False False True True False True True False True])
  </code></pre>
  
  <p>I have a flag of a specific type of data, which is a boolean masked array:</p>
  
  <pre><code>flag = masked_array(data = [True False False True -- -- -- False -- True -- -- -- -- True],
                      mask = [False False False False True True True False True False True True True True False])
  </code></pre>
  
  <p>I want to do something like <code>data[flag]</code> and get the following output:</p>
  
  <pre><code>output_wanted = [7 1 -- --]
  </code></pre>
  
  <p>which corresponds to the data elements where the flag is True. Instead I get this:</p>
  
  <pre><code>output_real = [7 -- 7 1 8 -- 1 1 -- -- 3 -- -- 3 --]
  </code></pre>
  
  <p>I did not copied the masks of the outputs for better clarity. </p>
  
  <p>I dont mind having an output with the size of the flag as long as it selects the data I want (the one corresponding to the True values of the flag). But I cannot figure out why it gives theses values in the real output !</p>