title: Using logical_and to combine numpy masks
body: <p>I've seen similar questions asked but I'm still struggling with combining masks.</p>
  
  <p>This is my code:</p>
  
  <pre><code>final_mask = ma.array(np.logical_and(a.mask, b.mask))
  
  combined_mask=(ma.array(data, mask=final_mask))
  </code></pre>
  
  <p><code>data</code> is the array I want to put the combined mask on to. </p>
  
  <p>When I plot the combined mask it seems to have ignored the <code>a.mask</code> as it returns values much higher than it should. I.e. anything over 200 was previously masked but it returns up to 300 here.</p>
  
  <p><code>a.mask</code> and <code>b.mask</code> have already been defined and checked so I think it's the combining that is the problem. They both return integers rather than <em>true/false</em> values which is what I'm after.</p>
  
  <p>Thank you</p>