title: Interpolate NaN values in a numpy array
body: <p>Is there a quick way of replacing all NaN values in a numpy array with (say) the linearly interpolated values?</p>
  
  <p>For example, </p>
  
  <pre><code>[1 1 1 nan nan 2 2 nan 0]
  </code></pre>
  
  <p>would be converted into</p>
  
  <pre><code>[1 1 1 1.3 1.6 2 2  1  0]
  </code></pre>