![](https://secure.gravatar.com/avatar/da3a0a1942fbdc5ee9a9b8115ac5dae7.jpg?s=120&d=mm&r=g)
29 Aug
2008
29 Aug
'08
12:23 p.m.
Thu, 28 Aug 2008 09:56:36 +0200, Stef Mientki wrote:
another observation:
a=numpy.array([2,3]) a/0 array([0, 0])
Division in Numpy preserves the data types: in this case you have an integer array divided by an integer, so the output is also an integer. But Inf is not one of integers so something must be substituted; and it is zero. There probably was some reason for this choice... If you change your seterr configuration frmo divide='ignore' you should get a warning, see http://mentat.za.net/numpy/refguide/routines.math.xhtml#numpy.divide -- Pauli Virtanen