title: Nan to Num Python
body: <p>I have multiple array that for those I calculate a linear regression, but sometimes it gives me 0/0 values which gives me a <strong>'NaN'</strong>. I know that to convert an array where there are numbers that are NaN you can convert them using <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.nan_to_num.html" rel="nofollow noreferrer">numpy.nan_to_num</a>. But what if I want to convert a single value <strong>that's not in a array</strong>, but a result of a linear regression <a href="http://dacharts.org/archives/Ensign_Wiki/Newsletters/tradingtips54_files/54-2.gif" rel="nofollow noreferrer">calculation</a>?</p>
  <p>EDIT: It's not a duplicate question (<a href="https://stackoverflow.com/questions/5124376/convert-nan-value-to-zero">convert nan value to zero</a> ) since I'm referring to a item/result that <strong>is not in a array</strong></p>