title: Linear regression with Y values containing NAN using scipy
body: <p>I have two one dimension arrays and I would like to do some linear regression.
  I used:</p>
  
  <pre><code>slope, intercept, r_value, p_value, std_err = stats.linregress(x, y)
  </code></pre>
  
  <p>but the slope and intercept are always NAN, NAN. I read a little bit and I found  out that if either x or y has some NAN, that is the results expected. I tried this  <a href="https://stackoverflow.com/questions/13643363/linear-regression-of-arrays-containing-nans-in-python-numpy">solution</a> but it doesnt work because, in my case, only the y contains some NANs; not x. So using that solution, I have the error: 
  <code>ValueError: all the input array dimensions except for the concatenation axis must match exactly.</code> </p>
  
  <p>How can i fix this issue?</p>