We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9895525 commit 89e2869Copy full SHA for 89e2869
python/tests/beagle_numba.py
@@ -561,11 +561,13 @@ def interpolate_allele_probs(
561
w = weights[i]
562
for a in alleles:
563
is_a_in_ref_h = ref_h[i, :] == a
564
+ if np.sum(is_a_in_ref_h) == 0:
565
+ continue
566
if use_threshold:
567
# TODO: Check whether this is implemented correctly. Not used by default.
568
# Threshold based on "the number of subsets in the partition Am of H".
- threshold_Am = np.sum(is_a_in_ref_h)
- _MIN_THRESHOLD = min(0.005, 1 / threshold_Am)
569
+ threshold_Am = 1 / np.sum(is_a_in_ref_h)
570
+ _MIN_THRESHOLD = min(0.005, threshold_Am)
571
if k == 0:
572
# See 'setFirstAlleleProbs' in 'LSHapBaum.java'.
573
assert w == 1.0, "Weight should be 1.0."
0 commit comments