diff options
author | Tobias Pitters <tobias.pitters@gmail.com> | 2020-05-27 23:24:46 +0200 |
---|---|---|
committer | Tobias Pitters <tobias.pitters@gmail.com> | 2020-05-27 23:24:46 +0200 |
commit | eca2642d6ef92287fed64c59c30bcecfc6082857 (patch) | |
tree | 52d0d76aa036613f6ef9814fff92f2643a27178e /numpy/lib/tests/test_function_base.py | |
parent | a6bc717024da20632139db53211e3b09d63dd1ff (diff) | |
download | numpy-eca2642d6ef92287fed64c59c30bcecfc6082857.tar.gz |
limit range of lerp inputs
Diffstat (limited to 'numpy/lib/tests/test_function_base.py')
-rw-r--r-- | numpy/lib/tests/test_function_base.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py index f6c735264..b9ee49f16 100644 --- a/numpy/lib/tests/test_function_base.py +++ b/numpy/lib/tests/test_function_base.py @@ -3130,10 +3130,10 @@ class TestLerp: min_value=0, max_value=1), t1=st.floats(allow_nan=False, allow_infinity=False, min_value=0, max_value=1), - a=st.floats(allow_nan=False, allow_infinity=False, - width=32), - b= st.floats(allow_nan=False, allow_infinity=False, - width=32)) + a = st.floats(allow_nan=False, allow_infinity=False, + min_value=-1e300, max_value=1e300), + b = st.floats(allow_nan=False, allow_infinity=False, + min_value=-1e300, max_value=1e300)) def test_lerp_monotonic(self, t0, t1, a, b): l0 = np.lib.function_base._lerp(a, b, t0) l1 = np.lib.function_base._lerp(a, b, t1) @@ -3146,10 +3146,10 @@ class TestLerp: @hypothesis.given(t=st.floats(allow_nan=False, allow_infinity=False, min_value=0, max_value=1), - a=st.floats(allow_nan=False, allow_infinity=False, - width=32), - b=st.floats(allow_nan=False, allow_infinity=False, - width=32)) + a = st.floats(allow_nan=False, allow_infinity=False, + min_value=-1e300, max_value=1e300), + b = st.floats(allow_nan=False, allow_infinity=False, + min_value=-1e300, max_value=1e300)) def test_lerp_bounded(self, t, a, b): if a <= b: assert a <= np.lib.function_base._lerp(a, b, t) <= b @@ -3159,9 +3159,9 @@ class TestLerp: @hypothesis.given(t=st.floats(allow_nan=False, allow_infinity=False, min_value=0, max_value=1), a=st.floats(allow_nan=False, allow_infinity=False, - width=32), + min_value=-1e300, max_value=1e300), b=st.floats(allow_nan=False, allow_infinity=False, - width=32)) + min_value=-1e300, max_value=1e300)) def test_lerp_symmetric(self, t, a, b): # double subtraction is needed to remove the extra precision that t < 0.5 has assert np.lib.function_base._lerp(a, b, 1 - (1 - t)) == np.lib.function_base._lerp(b, a, 1 - t) |