Skip to content

Commit a7015c6

Browse files
committed
TST: stats.logser: test infinite loop bug
1 parent 8b742ed commit a7015c6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scipy/stats/tests/test_distributions.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2180,6 +2180,13 @@ def test_mean_small_p(self):
21802180
# 1.000000005
21812181
assert_allclose(m, 1.000000005)
21822182

2183+
def test_gh20048(self):
2184+
# gh-20048 reported an infinite loop; see if we can reproduce it
2185+
p, q = 0.25739239425774363, 0.9999999999999999
2186+
res = stats.logser(p).ppf(q)
2187+
ref = 99
2188+
assert_equal(res, ref)
2189+
21832190

21842191
class TestGumbel_r_l:
21852192
@pytest.fixture(scope='function')

0 commit comments

Comments
 (0)