title: Flag NaN values rearest neighbor with xarray
body: <p>I am working on netcdf dataset that sometimes have a large cloud coverage, materialized by <code>NaN</code>. Is there a way to flag the <code>n</code> neighbors of <code>NaN</code> patches ? Namely, go from this:</p>
  <pre><code>array([[0.7, 0.3, 0.9, 0.2, 0.6, 0.5, 0.2, 1. ],
         [0.2, 1. , 0.2, 0.2, 0.7, 0. , 1. , 0.2],
         [0.6, 0.4, 0.8, 0.1, 0.2, 0.5, 0.8, 0.7],
         [0.5, 1. , 0.3, 0.8, 0.2, 0.9, 0.2, 0.1],
         [nan, nan, 1. , 0.7, 0.5, 0.7, 0.8, 0.6],
         [nan, nan, 0.6, 0.4, 0.3, 0.8, 0.2, 0.8]])
  </code></pre>
  <p>To this (for <code>n = 2</code>):</p>
  <pre><code>array([[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ],
         [0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ],
         [1. , 1. , 1. , 1. , 0. , 0. , 0. , 0. ],
         [1. , 1. , 1. , 1. , 0. , 0. , 0. , 0. ],
         [nan, nan, 1. , 1. , 0. , 0. , 0. , 0. ],
         [nan, nan, 1. , 1. , 0. , 0. , 0. , 0. ]])
  </code></pre>
  <p>I tried using <code>xarray.dataarray.rolling()</code> but it does not support <code>np.isnan()</code> (see error bellow).</p>
  <pre><code>TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
  </code></pre>
  <p>Thanks in advance for your help.</p>