summaryrefslogtreecommitdiff
path: root/numpy/polynomial/tests/test_classes.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/polynomial/tests/test_classes.py')
-rw-r--r--numpy/polynomial/tests/test_classes.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/numpy/polynomial/tests/test_classes.py b/numpy/polynomial/tests/test_classes.py
index cd5a54687..a7cf7209c 100644
--- a/numpy/polynomial/tests/test_classes.py
+++ b/numpy/polynomial/tests/test_classes.py
@@ -173,11 +173,18 @@ def check_fit(Poly):
assert_almost_equal(p(x), y)
assert_almost_equal(p.domain, d)
assert_almost_equal(p.window, w)
+ p = Poly.fit(x, y, [0, 1, 2, 3], domain=d, window=w)
+ assert_almost_equal(p(x), y)
+ assert_almost_equal(p.domain, d)
+ assert_almost_equal(p.window, w)
# check with class domain default
p = Poly.fit(x, y, 3, [])
assert_equal(p.domain, Poly.domain)
assert_equal(p.window, Poly.window)
+ p = Poly.fit(x, y, [0, 1, 2, 3], [])
+ assert_equal(p.domain, Poly.domain)
+ assert_equal(p.window, Poly.window)
# check that fit accepts weights.
w = np.zeros_like(x)
@@ -185,7 +192,9 @@ def check_fit(Poly):
w[::2] = 1
p1 = Poly.fit(x[::2], z[::2], 3)
p2 = Poly.fit(x, z, 3, w=w)
+ p3 = Poly.fit(x, z, [0, 1, 2, 3], w=w)
assert_almost_equal(p1(x), p2(x))
+ assert_almost_equal(p2(x), p3(x))
def check_equal(Poly):