Closed szhan closed 2 weeks ago
Something like below should be added to check_inputs
.
# Check the recombination probability.
if isinstance(prob_recombination, (int, float)):
pass
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."
raise ValueError(err_msg)
else:
err_msg = (
"Recombination probability is not a scalar or an array of expected length."
)
raise ValueError(err_msg)
A check should be implemented in
api.py
to check that the first value of the input recombination probability array is zero.