[Numpy-tickets] [NumPy] #541: int division by zero give wrong results

NumPy numpy-tickets@scipy....
Wed Jun 27 19:14:13 CDT 2007

#541: int division by zero give wrong results
 Reporter:  chipschips  |        Owner:  somebody     
     Type:  defect      |       Status:  closed       
 Priority:  normal      |    Milestone:  1.0.4 Release
Component:  Other       |      Version:  none         
 Severity:  normal      |   Resolution:  wontfix      
 Keywords:              |  
Changes (by rkern):

  * status:  new => closed
  * resolution:  => wontfix


 This is intentional. Integers operated with integers should return
 integers. Unfortunately, there is no integer infinity that we can use. By
 default in 1.0.3 (at least) we print a warning.


 In [1]: from numpy import *

 In [2]: 1/int_(0)
 Warning: divide by zero encountered in long_scalars
 Out[2]: 0


 You can change this to raise an error or silence the warning using the
 {{{seterr()}}} function.

Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/541#comment:2>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.

More information about the Numpy-tickets mailing list