Closed daniel-klein closed 6 months ago
For a Bernoulli distribution, it feels like the user shouldn't be able to choose any other distribution -- right?
I guess they could use the delta distribution (if we end up going with that). But that's likely a weird corner case
Fixed, filter
is now only available for Bernoulli distributions. Otherwise, the user could mess them up, but I don't think this is more of a risk than other things, and you get a reasonably clear error mesage:
import starsim as ss
pars = dict(
diseases = dict(
type = 'sir',
p_death = ss.lognorm_ex(),
),
networks = 'random'
)
sim = ss.Sim(pars)
sim.run()
sim.disp()
IndexError: arrays used as indices must be of integer (or boolean) type
Users shouldn't be able to substitute a Gaussian in place of a Bernoulli, etc. Need sufficient compatibility checking.