From 008e5e9c6ee24b6675dc582373c4a14cbe5ec22e Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Tue, 6 Dec 2011 21:53:45 -0700 Subject: [PATCH] TST: Add test for weight modification. --- numpy/ma/tests/test_extras.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/numpy/ma/tests/test_extras.py b/numpy/ma/tests/test_extras.py index be995d617f35..f1b36a15d5b2 100644 --- a/numpy/ma/tests/test_extras.py +++ b/numpy/ma/tests/test_extras.py @@ -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_)