diff options
Diffstat (limited to 'numpy/lib/tests/test_polynomial.py')
-rw-r--r-- | numpy/lib/tests/test_polynomial.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/numpy/lib/tests/test_polynomial.py b/numpy/lib/tests/test_polynomial.py index 4adc6aed8..02faa0283 100644 --- a/numpy/lib/tests/test_polynomial.py +++ b/numpy/lib/tests/test_polynomial.py @@ -78,8 +78,11 @@ poly1d([ 2.]) (poly1d([ 1., -1.]), poly1d([ 0.])) ''' -from numpy.testing import * import numpy as np +from numpy.testing import ( + run_module_suite, TestCase, assert_, assert_equal, assert_array_equal, + assert_almost_equal, rundocs + ) class TestDocs(TestCase): @@ -118,10 +121,10 @@ class TestDocs(TestCase): assert_almost_equal(val0, cov, decimal=4) m2, cov2 = np.polyfit(x, y+err, 2, w=weights, cov=True) - assert_almost_equal([4.8927, -1.0177, 1.7768], m2, decimal=4) - val = [[8.7929, -10.0103, 0.9756], - [-10.0103, 13.6134, -1.8178], - [0.9756, -1.8178, 0.6674]] + assert_almost_equal([4.8927, -1.0177, 1.7768], m2, decimal=4) + val = [[8.7929, -10.0103, 0.9756], + [-10.0103, 13.6134, -1.8178], + [0.9756, -1.8178, 0.6674]] assert_almost_equal(val, cov2, decimal=4) # check 2D (n,1) case |