Skip to content

Conversation

@jeromekelleher
Copy link
Member

We want easy ways to create standard models. This is a first pass for discussion. Use like

import demes

# 10 population island model, each of size 100
g1 = demes.models.island_model([100] * 10, migration_rate=0.1)
# 3 population stepping stone model, of size 10, 20 and 30
g2 = demes.models.stepping_stone([10, 20, 30], migration_rate=0.1)

Using the demes.models namespace here seems like a nice way to do this.

@grahamgower
Copy link
Member

That looks nice and clean, and I think the demes.models namespace is a good one. It probably does belong here in Demes, but in any event I'll link to the related stdpopsim issue.

@jeromekelleher
Copy link
Member Author

Great, I'll add some tests. Generic models always seemed like bloat in stdpopsim to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants