def evolve_snowdrift(args):
N, seed = args<EOL>pop = fp11.DiploidPopulation(N)<EOL>rng = fp11.GSLrng(seed)<EOL>p = {'<STR_LIT>': [fp11.ExpS(<NUM_LIT:0>, <NUM_LIT:1>, <NUM_LIT:1>, -<NUM_LIT:0.1>, <NUM_LIT:1.0>)],<EOL>'<STR_LIT>': [fp11.Region(<NUM_LIT:0>, <NUM_LIT:1>, <NUM_LIT:1>)],<EOL>'<STR_LIT>': [],<EOL>'<STR_LIT>': snowdrift.DiploidSnowdrift(<NUM_LIT>, -<NUM_LIT>, <NUM_LIT:1>, -<NUM_LIT:2>),<EOL>'<STR_LIT>': np.array([N] * <NUM_LIT:100>, dtype=np.uint32),<EOL>'<STR_LIT>': (<NUM_LIT:0.0>, <NUM_LIT>, <NUM_LIT>),<EOL>'<STR_LIT>': False<EOL>}<EOL>params = fwdpy11.ModelParams(**p)<EOL>sampler = SamplePhenotypes(params.gvalue)<EOL>fp11.evolve_genomes(rng, pop, params, sampler)<EOL>return pop<EOL>
We write the function taking a tuple
out of habit, simplifying later
integration with multiprocessing or
concurrent.futures.