Unverified Commit 6218dc3a authored by SvenDS9's avatar SvenDS9 Committed by GitHub
Browse files

guard against deprecation of binom_test (#7404)

parent e59cf64b
......@@ -1640,7 +1640,7 @@ class TestStochasticDepth:
counts += batch_size - non_zero_count
num_samples += batch_size
p_value = stats.binom_test(counts, num_samples, p=p)
p_value = stats.binomtest(counts, num_samples, p=p).pvalue
assert p_value > 0.01
@pytest.mark.parametrize("seed", range(10))
......
......@@ -1445,7 +1445,7 @@ def test_random_order():
if out == resize_crop_out:
num_normal_order += 1
p_value = stats.binom_test(num_normal_order, num_samples, p=0.5)
p_value = stats.binomtest(num_normal_order, num_samples, p=0.5).pvalue
random.setstate(random_state)
assert p_value > 0.0001
......@@ -1851,7 +1851,7 @@ def test_random_erasing(seed):
aspect_ratios.append(h / w)
count_bigger_then_ones = len([1 for aspect_ratio in aspect_ratios if aspect_ratio > 1])
p_value = stats.binom_test(count_bigger_then_ones, trial, p=0.5)
p_value = stats.binomtest(count_bigger_then_ones, trial, p=0.5).pvalue
assert p_value > 0.0001
# Checking if RandomErasing can be printed as string
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment