Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove requiring the first value of input recombination probability array be zero #138

Merged
merged 1 commit into from
Jun 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading