summaryrefslogtreecommitdiff
path: root/numpy/polynomial/tests/test_polynomial.py
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/polynomial/tests/test_polynomial.py')
-rw-r--r--numpy/polynomial/tests/test_polynomial.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/polynomial/tests/test_polynomial.py b/numpy/polynomial/tests/test_polynomial.py
index 7ba5b6c8f..13718fe9e 100644
--- a/numpy/polynomial/tests/test_polynomial.py
+++ b/numpy/polynomial/tests/test_polynomial.py
@@ -434,7 +434,13 @@ class TestPolynomialClass(TestCase) :
return x*(x - 1)*(x - 2)
x = np.linspace(0,3)
y = f(x)
+
+ # test default value of domain
p = poly.Polynomial.fit(x, y, 3)
+ assert_almost_equal(p.domain, [0,3])
+
+ # test that fit works in given domains
+ p = poly.Polynomial.fit(x, y, 3, 'default')
assert_almost_equal(p(x), y)
p = poly.Polynomial.fit(x, y, 3, None)
assert_almost_equal(p(x), y)