Skip to content

Commit

Permalink
fmt and fix sim time
Browse files Browse the repository at this point in the history
  • Loading branch information
molpopgen committed Nov 3, 2023
1 parent 3da9d81 commit 2400cdd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/gss_divergent_optima/gss_divergent_optima.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"""

demography = fwdpy11.ForwardDemesGraph.from_demes(
yaml, burnin=10*N, burnin_is_exact=True)
yaml, burnin=10 * N + 200, burnin_is_exact=True
)

moving_optimum_deme_0 = fwdpy11.GSSmo(
[
Expand Down Expand Up @@ -70,16 +71,15 @@
# Mapping of trait (genetic) value to fitness
gvalue_to_fitness=moving_optimum_deme_0,
),
fwdpy11.Additive(ndemes=2, scaling=2,
gvalue_to_fitness=moving_optimum_deme_1),
fwdpy11.Additive(ndemes=2, scaling=2, gvalue_to_fitness=moving_optimum_deme_1),
],
}

params = fwdpy11.ModelParams(**pdict)
pop = fwdpy11.DiploidPopulation([N, N], 1.0)
rng = fwdpy11.GSLrng(1010)
fwdpy11.evolvets(rng, pop, params, 100)
assert pop.generation == 10*N + 200
assert pop.generation == 10 * N + 200
md = np.array(pop.diploid_metadata, copy=False)
df = pd.DataFrame.from_records(md[["deme", "g", "w"]])
g = df.groupby(["deme"])
Expand Down

0 comments on commit 2400cdd

Please sign in to comment.