summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Pitters <tobias.pitters@gmail.com>2020-06-12 23:36:31 +0200
committerTobias Pitters <tobias.pitters@gmail.com>2020-06-12 23:36:31 +0200
commit88acbc852eeb73edd0d09c773f125725c8a0587b (patch)
tree7e2610d49f2bf7b7f287646ff239c95e22c3b645
parent45605b241df185d4156edc740b794f1ff24fd61d (diff)
downloadnumpy-88acbc852eeb73edd0d09c773f125725c8a0587b.tar.gz
limit test_quantile_monotonic
-rw-r--r--numpy/lib/tests/test_function_base.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/numpy/lib/tests/test_function_base.py b/numpy/lib/tests/test_function_base.py
index cd88c5634..5ccac62e4 100644
--- a/numpy/lib/tests/test_function_base.py
+++ b/numpy/lib/tests/test_function_base.py
@@ -3112,11 +3112,16 @@ class TestQuantile:
# GH 14685
# test that the return value of quantile is monotonic if p0 is ordered
p0 = np.arange(0, 1, 0.01)
- quantile = np.quantile(np.array([0, 1, 1, 2, 2, 3, 3, 4, 5, 5, 1, 1, 9, 9, 9, 8, 8, 7]) * 0.1, p0)
+ quantile = np.quantile(np.array([0, 1, 1, 2, 2, 3, 3, 4, 5, 5, 1, 1, 9, 9, 9,
+ 8, 8, 7]) * 0.1, p0)
assert_equal(np.sort(quantile), quantile)
- @hypothesis.given(arr=arrays(dtype=np.float, shape=st.integers(min_value=3, max_value=1000),
- elements=st.floats(allow_infinity=False, allow_nan=False)))
+ @hypothesis.given(arr=arrays(dtype=np.float, shape=st.integers(min_value=3,
+ max_value=1000),
+ elements=st.floats(allow_infinity=False,
+ allow_nan=False,
+ min_value=-1e300,
+ max_value=1e300)))
def test_quantile_monotonic_hypo(self, arr):
p0 = np.arange(0, 1, 0.01)
quantile = np.quantile(arr, p0)