emilydolson / phylotrackpy

Python phylogeny tracker for in silico evolution experiments
MIT License
10 stars 2 forks source link

`load_from_file` segfaults if root is extant #49

Closed mmore500 closed 10 months ago

mmore500 commented 10 months ago

a.csv

id,ancestor_list,origin_time,destruction_time,num_orgs,tot_orgs,num_offspring,total_offspring,depth
1,[NONE],0,10,1,1,2,3,0

b.csv, note root destruction_time is inf

id,ancestor_list,origin_time,destruction_time,num_orgs,tot_orgs,num_offspring,total_offspring,depth
1,[NONE],0,inf,1,1,2,3,0
from phylotrackpy.systematics import Systematics
sys = Systematics(lambda x: x, True, True, False, False)
sys.load_from_file("a.csv", "id")  # ok
sys.load_from_file("b.csv", "id")  # segfaults