Skip to content

Commit

Permalink
Remove requirement that the first value of input recombination probab…
Browse files Browse the repository at this point in the history
…ility array be zero
  • Loading branch information
szhan committed Jun 24, 2024
1 parent a5c1bec commit f9c3bd2
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lshmm/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,9 @@ def check_inputs(
if isinstance(prob_recombination, (int, float)):
prob_recombination = np.zeros(num_sites, dtype=np.float64) + prob_recombination
prob_recombination[0] = 0.0
elif (
isinstance(prob_recombination, np.ndarray)
and len(prob_recombination) == num_sites
):
if prob_recombination[0] != 0:
err_msg = "First value in the recombination probability array must be zero."
elif isinstance(prob_recombination, np.ndarray):
if len(prob_recombination) != num_sites:
err_msg = "Recombination probability is an array of unexpected length."
raise ValueError(err_msg)
else:
err_msg = (
Expand Down

0 comments on commit f9c3bd2

Please sign in to comment.