summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_polynomial.py
diff options
context:
space:
mode:
authorStefan van der Walt <stefan@sun.ac.za>2011-09-14 17:01:14 -0700
committerStefan van der Walt <stefan@sun.ac.za>2011-09-14 17:01:14 -0700
commita2a9dfb692e36bdaf5667fb0d41e05c79d77f981 (patch)
tree2c70584285da417b0f80121bdfe3a0b31b2a74f3 /numpy/lib/tests/test_polynomial.py
parentaf22fc43921e2e7f77e909a1acf77011f682ff7b (diff)
downloadnumpy-a2a9dfb692e36bdaf5667fb0d41e05c79d77f981.tar.gz
BUG: Fix polynomial tests.
Diffstat (limited to 'numpy/lib/tests/test_polynomial.py')
-rw-r--r--numpy/lib/tests/test_polynomial.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/tests/test_polynomial.py b/numpy/lib/tests/test_polynomial.py
index 6860257e2..3c69cb93b 100644
--- a/numpy/lib/tests/test_polynomial.py
+++ b/numpy/lib/tests/test_polynomial.py
@@ -103,7 +103,7 @@ class TestDocs(TestCase):
x = np.linspace(0,2,7)
y = np.polyval(c,x)
err = [1,-1,1,-1,1,-1,1]
- weights = arange(8,1,-1)**2/7.0
+ weights = np.arange(8,1,-1)**2/7.0
# check 1D case
m, cov = np.polyfit(x,y+err,2,cov=True)
@@ -130,7 +130,7 @@ class TestDocs(TestCase):
cc = np.concatenate((c,c), axis=1)
assert_almost_equal(cc, np.polyfit(x,yy,2))
- m, cov = np.polyfit(x,yy+array(err)[:,np.newaxis],2,cov=True)
+ m, cov = np.polyfit(x,yy + np.array(err)[:,np.newaxis],2,cov=True)
assert_almost_equal(est, m[:,0], decimal=4)
assert_almost_equal(est, m[:,1], decimal=4)
assert_almost_equal(val0, cov[:,:,0], decimal=4)