Skip to content

Commit

Permalink
TST: Add test for weight modification.
Browse files Browse the repository at this point in the history
  • Loading branch information
charris committed Dec 15, 2011
1 parent eb042bf commit 008e5e9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions numpy/ma/tests/test_extras.py
Expand Up @@ -632,11 +632,13 @@ def test_polyfit(self):
assert_almost_equal(a, a_)
#
w = np.random.rand(10) + 1
wo = w.copy()
xs = x[1:-1]
ys = y[1:-1]
ws = w[1:-1]
(C, R, K, S, D) = polyfit(x, y, 3, full=True, w=w)
(c, r, k, s, d) = np.polyfit(xs, ys, 3, full=True, w=ws)
assert_equal(w, wo)
for (a, a_) in zip((C, R, K, S, D), (c, r, k, s, d)):
assert_almost_equal(a, a_)

Expand Down

0 comments on commit 008e5e9

Please sign in to comment.