summaryrefslogtreecommitdiff
path: root/numpy/polynomial/tests/test_polynomial.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2010-08-15 00:40:26 +0000
committerCharles Harris <charlesr.harris@gmail.com>2010-08-15 00:40:26 +0000
commit6b9762c0a918acb583bee7e387863123e339e46c (patch)
tree383363edd7b3ede838d6c4eba69f514d1dabd878 /numpy/polynomial/tests/test_polynomial.py
parent50db7ff052aef5e0399464a6bbaa7540b83247ea (diff)
downloadnumpy-6b9762c0a918acb583bee7e387863123e339e46c.tar.gz
BUG: Fix integration of zero polynomials.
Remove checks that prevent use of foreign scalar types for lower bounds and integration constants. Cleanup code a bit.
Diffstat (limited to 'numpy/polynomial/tests/test_polynomial.py')
-rw-r--r--numpy/polynomial/tests/test_polynomial.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/numpy/polynomial/tests/test_polynomial.py b/numpy/polynomial/tests/test_polynomial.py
index 4bfbc46d9..3a3f26861 100644
--- a/numpy/polynomial/tests/test_polynomial.py
+++ b/numpy/polynomial/tests/test_polynomial.py
@@ -124,8 +124,12 @@ class TestCalculus(TestCase) :
assert_raises(ValueError, poly.polyint, [0], .5)
assert_raises(ValueError, poly.polyint, [0], -1)
assert_raises(ValueError, poly.polyint, [0], 1, [0,0])
- assert_raises(ValueError, poly.polyint, [0], 1, lbnd=[0,0])
- assert_raises(ValueError, poly.polyint, [0], 1, scl=[0,0])
+
+ # test integration of zero polynomial
+ for i in range(2, 5):
+ k = [0]*(i - 2) + [1]
+ res = poly.polyint([0], m=i, k=k)
+ assert_almost_equal(res, [0, 1])
# check single integration with integration constant
for i in range(5) :