Skip to content

Commit

Permalink
Merge pull request astheeggeggs#122 from szhan/fix_bug_add_extreme_rates
Browse files Browse the repository at this point in the history
Fix bug when adding extreme recombination probabilities
  • Loading branch information
szhan authored Jun 19, 2024
2 parents 0ce7e3d + bb5803b commit 1157f11
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tests/lsbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,10 @@ def get_examples_pars(
), "Reference haplotypes have unexpected number of copiable entries."

r_s = [
np.zeros(m) + 0.01, # Equal recombination and mutation
np.random.rand(m), # Random
1e-5 * (np.random.rand(m) + 0.5) / 2,
np.append([0], np.zeros(m - 1) + 0.01),
np.append([0], np.random.rand(m - 1)),
np.append([0], 1e-5 * (np.random.rand(m - 1) + 0.5) / 2),
]
for i in range(len(r_s)):
r_s[i][0] = 0

mu_s = [
np.zeros(m) + 0.01, # Equal recombination and mutation
Expand All @@ -165,8 +163,8 @@ def get_examples_pars(
]

if include_extreme_rates:
r_s.append(np.zeros(m) + 0.2)
r_s.append(np.zeros(m) + 1e-6)
r_s.append(np.append([0], np.zeros(m - 1) + 0.2))
r_s.append(np.append([0], np.zeros(m - 1) + 1e-6))
mu_s.append(np.zeros(m) + 0.2)
mu_s.append(np.zeros(m) + 1e-6)

Expand Down

0 comments on commit 1157f11

Please sign in to comment.