summaryrefslogtreecommitdiff
path: root/numpy/lib/tests
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/lib/tests')
-rw-r--r--numpy/lib/tests/test_function_base.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
index 145c83b77..67a5204a1 100644
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -1179,6 +1179,11 @@ class TestInterp(TestCase):
x0 = np.array(.3, dtype=object)
assert_almost_equal(np.interp(x0, x, y), .3)
+ def test_if_len_x_is_small(self):
+ xp = np.arange(0, 1000, 0.0001)
+ fp = np.sin(xp)
+ assert_almost_equal(np.interp(np.pi, xp, fp), 0.0)
+
def compare_results(res, desired):
for i in range(len(desired)):