Skip to content

Commit

Permalink
Fix assertion bug
Browse files Browse the repository at this point in the history
  • Loading branch information
szhan committed Aug 31, 2023
1 parent 5bedbc0 commit 2be7772
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/tests/beagle.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,13 @@ def get_switch_prob(pos, h, ne=1e6):
:param numpy.ndarray pos: Site positions.
:param int h: Number of reference haplotypes.
:param float ne: Effective population size.
:param int ne: Effective population size.
:return: Switch probabilities.
:rtype: numpy.ndarray
"""
assert pos[0] > 0, "Site positions are not 1-based."
assert isinstance(h, int), "Number of reference haplotypes is not an integer."
assert isinstance(ne, float), "Effective population size is not a float."
assert isinstance(ne, int), "Effective population size is not an integer."
# Get genetic distance between adjacent markers.
cm = np.concatenate([[0], convert_to_genetic_map_position(pos)])
gen_dist = cm[1:] - cm[:-1]
Expand Down

0 comments on commit 2be7772

Please sign in to comment.