diff options
Diffstat (limited to 'numpy/polynomial/tests/test_polynomial.py')
-rw-r--r-- | numpy/polynomial/tests/test_polynomial.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/numpy/polynomial/tests/test_polynomial.py b/numpy/polynomial/tests/test_polynomial.py index bae711cbf..bd09c07f6 100644 --- a/numpy/polynomial/tests/test_polynomial.py +++ b/numpy/polynomial/tests/test_polynomial.py @@ -440,6 +440,11 @@ class TestMisc(TestCase) : # wcoef2d = poly.polyfit(x, np.array([yw,yw]).T, 3, w=w) assert_almost_equal(wcoef2d, np.array([coef3,coef3]).T) + # test scaling with complex values x points whose square + # is zero when summed. + x = [1, 1j, -1, -1j] + assert_almost_equal(poly.polyfit(x, x, 1), [0, 1]) + def test_polytrim(self) : coef = [2, -1, 1, 0] |