title: Why don't NumPy floats give ZeroDivisionError?
body: <p>I noticed that in the code:</p>
  
  <pre><code>import numpy as np    
  
  a = 0.0
  print a / a
  
  b = np.array( [0.0] )
  print b[0] / b[0]  
  </code></pre>
  
  <p>the first print function throws a ZeroDivisionError, but the second one outputs <code>nan</code>.  I'm aware that <code>type(b[0])</code> is <code>numpy.float64</code>, while <code>type(a)</code> is <code>float</code>.  I have two questions:</p>
  
  <p>1) Why was it implemented this way?</p>
  
  <p>2) Is there anyway to have it throw a ZeroDivisionError?</p>