diff options
Diffstat (limited to 'numpy/polynomial/tests')
-rw-r--r-- | numpy/polynomial/tests/test_chebyshev.py | 8 | ||||
-rw-r--r-- | numpy/polynomial/tests/test_polynomial.py | 8 |
2 files changed, 16 insertions, 0 deletions
diff --git a/numpy/polynomial/tests/test_chebyshev.py b/numpy/polynomial/tests/test_chebyshev.py index 8ae1dee6f..cc23ba701 100644 --- a/numpy/polynomial/tests/test_chebyshev.py +++ b/numpy/polynomial/tests/test_chebyshev.py @@ -78,6 +78,14 @@ class TestArithmetic(TestCase) : res = ch.chebsub([0]*i + [1], [0]*j + [1]) assert_equal(trim(res), trim(tgt), err_msg=msg) + def test_chebmulx(self): + assert_equal(ch.chebmulx([0]), [0]) + assert_equal(ch.chebmulx([1]), [0,1]) + for i in range(1, 5): + ser = [0]*i + [1] + tgt = [0]*(i - 1) + [.5, 0, .5] + assert_equal(ch.chebmulx(ser), tgt) + def test_chebmul(self) : for i in range(5) : for j in range(5) : diff --git a/numpy/polynomial/tests/test_polynomial.py b/numpy/polynomial/tests/test_polynomial.py index 3a3f26861..5890ac13f 100644 --- a/numpy/polynomial/tests/test_polynomial.py +++ b/numpy/polynomial/tests/test_polynomial.py @@ -61,6 +61,14 @@ class TestArithmetic(TestCase) : res = poly.polysub([0]*i + [1], [0]*j + [1]) assert_equal(trim(res), trim(tgt), err_msg=msg) + def test_polymulx(self): + assert_equal(poly.polymulx([0]), [0]) + assert_equal(poly.polymulx([1]), [0, 1]) + for i in range(1, 5): + ser = [0]*i + [1] + tgt = [0]*(i + 1) + [1] + assert_equal(poly.polymulx(ser), tgt) + def test_polymul(self) : for i in range(5) : for j in range(5) : |