diff --git a/python/tests/beagle_numba.py b/python/tests/beagle_numba.py index 8a6cdcc5d2..8ab5a732f0 100644 --- a/python/tests/beagle_numba.py +++ b/python/tests/beagle_numba.py @@ -67,7 +67,10 @@ def convert_to_genetic_map_positions(pos, genetic_map=None): fb = genetic_map.gen_pos[ left_idx[i] ] # Genetic map position at right of marker i. - est_gen_pos[i] = fa + (pos[i] - a) / (b - a) * (fa - fb) + assert pos[i] > a, "Query position not greater than left-bound position." + assert b > a, "Physical positions not in ascending order." + assert fb > fa, "Genetic map positions not in ascending order." + est_gen_pos[i] = fa + (pos[i] - a) / (b - a) * (fb - fa) return est_gen_pos