[Numpy-discussion] polynomial subtraction buglet in 0.9.6.2193

Gerard Vermeulen gerard.vermeulen at grenoble.cnrs.fr
Fri Mar 3 00:45:01 CST 2006


I found the following buglet in the polynomial subtraction of numpy-0.9.6.2193:

diff -u polynomial.py.dtype polynomial.py
--- polynomial.py.dtype 2006-03-03 09:34:40.000000000 +0100
+++ polynomial.py       2006-03-03 09:36:29.000000000 +0100
@@ -265,10 +265,10 @@
     if diff == 0:
         return a1 - a2
     elif diff > 0:
-        zr = NX.zeros(diff, a1)
+        zr = NX.zeros(diff, a1.dtype)
         val = NX.concatenate((zr, a1)) - a2
     else:
-        zr = NX.zeros(abs(diff), a2)
+        zr = NX.zeros(abs(diff), a2.dtype)
         val = a1 - NX.concatenate((zr, a2))
     if truepoly:
         val = poly1d(val)


Gerard





More information about the Numpy-discussion mailing list