You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but individuals_alive_at() does not show anyone alive at any time:
import pyslim
import numpy as np
ts = pyslim.load("remember.trees")
print(ts.num_individuals)
print([len(ts.individuals_alive_at(x)) for x in range(20)])
A look at the code reveals that the code uses individual_ages, which are all -1 in WF models. Whoops. I guess this wasn't being tested in a WF model. (damn bifurcating code paths)
One solution would be an if statement in the code, checking if it's a WF model. But I think it would make much more sense to actually set individual_ages all to 0 for a WF model, since that's actually what their ages are.
The text was updated successfully, but these errors were encountered:
As discovered in #38,
individuals_alive_at( )
doesn't work with WF models.Here is a simple SLiM recipe:
but
individuals_alive_at()
does not show anyone alive at any time:A look at the code reveals that the code uses
individual_ages
, which are all-1
in WF models. Whoops. I guess this wasn't being tested in a WF model. (damn bifurcating code paths)One solution would be an
if
statement in the code, checking if it's a WF model. But I think it would make much more sense to actually setindividual_ages
all to0
for a WF model, since that's actually what their ages are.The text was updated successfully, but these errors were encountered: