title: Python: Replacing NaN or MEAN instead of a -999 value in an array
body: <p>I got an array like this</p>
  
  <pre><code>array[1,3,5,-999,3,1,6,8,-999,-999,-999,3,5,7]
  </code></pre>
  
  <p>The -999 number represents missing data, i'd like replace this -999 by the mean of the right and left numbers or substituting by NaN</p>
  
  <p>In another questions ask for replace nan for zeros, mean, etc. Here i ask for the oposite, i wanna replace a number by nan </p>