[Numpy-discussion] Re: sqrt and divide
Alan G Isaac
aisaac at american.edu
Wed Apr 12 06:11:11 CDT 2006
> Stefan van der Walt wrote:
>> In : N.divide(1,0)
>> Out: 0
>> should probably ruturn inf / nan?)
On Wed, 12 Apr 2006, Robert Kern apparently wrote:
> inf and nan are floating point values. The definition of
> int division used when both arguments to divide() are ints
> also yields ints, not floats.
But the Python behavior seems better for this case.
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ZeroDivisionError: integer division or modulo by zero
More information about the Numpy-discussion