title: How to mask data in scipy.interpolate.RectBivariateSpline
body: <p>I have some curvilinear gridded data, and I'm trying to interpolate this data to a new grid. The data has unrealistically high variables for the masked data, so I tried masking using:</p>
  
  <pre><code>temp = np.ma.masked_where(temp &gt; 500, temp)
  </code></pre>
  
  <p>if I do this then:</p>
  
  <pre><code>&gt;&gt;&gt; temp.max()
  28.174417
  </code></pre>
  
  <p>However, when I run:</p>
  
  <pre><code>temp = RectBivariateSpline(lon, lat,
                             np.swapaxes(temp, 0, 1))
  temp = temp.ev(newgrid_lon, newgrid_lat)
  </code></pre>
  
  <p>I end up with the unrealistically high mask values again:</p>
  
  <pre><code>&gt;&gt;&gt; temp.max()
  1.541312613999187e+30
  </code></pre>
  
  <p><code>scipy.interpolate</code> is obviously not accepting my mask. Does anyone know how to set a mask for <code>scipy.interpolate</code> or know any workarounds? Thanks.</p>