Skip to content

Commit

Permalink
Add hard assert on TreeSequence time units
Browse files Browse the repository at this point in the history
  • Loading branch information
molpopgen committed Jan 22, 2024
1 parent 651f629 commit 0af4589
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fwdpy11/_types/diploid_population.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ def create_from_tskit(
of fwdpy11.
"""
# NOTE: this assert will intentionally fail if we ever support
# export to tskit for models where time units are something else
assert ts.time_units == "generations"
generation = 0
if len(ts.metadata) > 0:
if "generation" in ts.metadata:
Expand Down

0 comments on commit 0af4589

Please sign in to comment.