From 019215525b729cd90a6a79f11e85d98a12075e23 Mon Sep 17 00:00:00 2001 From: Shing Zhan Date: Mon, 19 Feb 2024 15:57:41 +0000 Subject: [PATCH] Use tskit constant for missing data --- python/tests/beagle_numba.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/tests/beagle_numba.py b/python/tests/beagle_numba.py index 089dca0843..ee15681f06 100644 --- a/python/tests/beagle_numba.py +++ b/python/tests/beagle_numba.py @@ -457,8 +457,8 @@ def run_interpolation_beagle( stacklevel=1, ) # Set marker indices. - typed_idx = np.where(query_h != -1)[0] - untyped_idx = np.where(query_h == -1)[0] + typed_idx = np.where(query_h != tskit.MISSING_DATA)[0] + untyped_idx = np.where(query_h == tskit.MISSING_DATA)[0] # Set physical positions of markers. typed_pos = pos[typed_idx] untyped_pos = pos[untyped_idx] @@ -530,8 +530,8 @@ def run_tsimpute( stacklevel=1, ) # Set markers indices. - typed_idx = np.where(query_h != -1)[0] - untyped_idx = np.where(query_h == -1)[0] + typed_idx = np.where(query_h != tskit.MISSING_DATA)[0] + untyped_idx = np.where(query_h == tskit.MISSING_DATA)[0] # Set physical positions of markers. typed_pos = pos[typed_idx] untyped_pos = pos[untyped_idx]