Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
szhan committed Sep 17, 2023
1 parent e5cbdc2 commit 53ec5d4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions python/tests/test_imputation.py
Original file line number Diff line number Diff line change
Expand Up @@ -664,12 +664,13 @@ def test_tsimpute(input_ref, input_query):
(np.array([10, 20]) * 1e6, np.array([5, 15]) * 1e6, np.array([1.0, 0.5])),
# Ungenotyped markers are right of the last genotyped marker.
(np.array([10, 20]) * 1e6, np.array([15, 25]) * 1e6, np.array([0.5, 0.0])),
# TODO: Min genetic distance threshold hit.
# Denominator below min threshold.
(np.array([10, 20]), np.array([15]), np.array([0.001])),
],
)
def test_get_weights(genotyped_pos, ungenotyped_pos, expected):
# TODO: Test indices.
actual = tests.beagle.get_weights(genotyped_pos, ungenotyped_pos)
np.testing.assert_array_equal(actual, expected)
np.testing.assert_allclose(actual, expected)
actual, _ = tests.beagle_numba.get_weights(genotyped_pos, ungenotyped_pos)
np.testing.assert_array_equal(actual, expected)
np.testing.assert_allclose(actual, expected)

0 comments on commit 53ec5d4

Please sign in to comment.