diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2014-07-31 14:30:10 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2014-07-31 14:30:10 -0600 |
commit | ae7c942ced535fb39384aefeb8d32df92fb15988 (patch) | |
tree | d06ae19daed6c32522e3a06fb27afb4490302d0d /numpy/lib/tests/test_polynomial.py | |
parent | 2ad538899928c249af456d93f250ebbd7535dcff (diff) | |
parent | 01b0d7e82211b581aaff925e3ccc36cff9ac1895 (diff) | |
download | numpy-ae7c942ced535fb39384aefeb8d32df92fb15988.tar.gz |
Merge pull request #4929 from juliantaylor/charris-pep8-numpy-lib
Charris pep8 numpy lib
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 |