title: All operations that will result in nan values(python)
body: <p>This may be a simple question but i could not get all the answers in one place, so any help and answer are welcome :) . I am trying to debug a program, But then I realize I don't know what are all the possible operation that may result in a NAN value in python. so here is the question what are all the possible operations that will result in a nan value in python specifically numpy matrices?</p>
  
  <p>An example will be like</p>
  
  <pre><code>x=float('nan')
  x=x+x
  print x
  </code></pre>
  
  <p>results in </p>
  
  <pre><code>nan
  </code></pre>