Skip to content

Commit acd2ad1

Browse files
committed
fix bug when max_n_pl<n_pl
1 parent 3c0f193 commit acd2ad1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SparseSC/utils/metrics_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ def _ncr(n, r):
290290
# math a bit nicer, I will reject a hypothesis if pval<=(1-level)
291291
assert 0 < level < 1 and level > 0, "Use a level in [0,1]"
292292
alpha = 1 - level
293-
p2min = 2 / n_pl
293+
p2min = 2 / comb_len
294294
alpha_ind = max((1, round(alpha / p2min))) - 1
295295
alpha = alpha_ind * p2min
296296

0 commit comments

Comments
 (0)