From 8930b1e73ed1e7f6dcaa1c59694ae9d1620be4f3 Mon Sep 17 00:00:00 2001 From: Shing Zhan Date: Mon, 5 Feb 2024 07:38:14 -0800 Subject: [PATCH] Add assertions to check on weights --- python/tests/beagle_numba.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/tests/beagle_numba.py b/python/tests/beagle_numba.py index 3f9111f638..e199d8cfde 100644 --- a/python/tests/beagle_numba.py +++ b/python/tests/beagle_numba.py @@ -382,9 +382,11 @@ def interpolate_allele_probs(sm, ref_h, typed_pos, untyped_pos, typed_cm, untype for a in alleles: if ref_h[i, j] == a: if k == 0: + assert w == 1.0, "Weight should be 1.0." probs[i, a] += sm[k, j] if k == m: # FIXME: It's unclear how BEAGLE handles this case. + assert w == 0.0, "Weight should be 0.0." probs[i, a] += sm[k - 1, j] else: probs[i, a] += w * sm[k - 1, j]