Skip to content

Commit

Permalink
BUG: Fix polynomial tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanv committed Sep 15, 2011
1 parent af22fc4 commit a2a9dfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions numpy/lib/tests/test_polynomial.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def test_polyfit(self) :
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)
Expand All @@ -130,7 +130,7 @@ def test_polyfit(self) :
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)
Expand Down

0 comments on commit a2a9dfb

Please sign in to comment.