2929b0f3738c43f52c32a37bf40791c88e3d9929,glyph/gp/individual.py,AExpressionTree,create_population,#Any#Any#Any#Any#Any#,268

Before Change


        if size < 0:
            raise RuntimeError("Cannot create population of size {}".format(size))
        toolbox = deap.base.Toolbox()
        toolbox.register("expr", gen_method, pset=cls.pset, min_=min, max_=max)
        toolbox.register("individual", deap.tools.initIterate, cls, toolbox.expr)
        toolbox.register("population", deap.tools.initRepeat, list, toolbox.individual)
        return toolbox.population(n=size)

After Change


        Create a list of individuals of class Individual.
        if size < 0:
            raise RuntimeError("Cannot create population of size {}".format(size))
        return [cls.create(gen_method=gen_method, min=min, max=max) for _ in range(size)]


def nd_phenotype(nd_tree, backend=sympy_phenotype):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: Ambrosys/glyph
Commit Name: 2929b0f3738c43f52c32a37bf40791c88e3d9929
Time: 2017-02-24
Author: mquade@uni-potsdam.de
File Name: glyph/gp/individual.py
Class Name: AExpressionTree
Method Name: create_population


Project Name: pantsbuild/pants
Commit Name: 1567f4673d48e3ed025c69d7905c02721d8224bf
Time: 2020-01-28
Author: benjyw@gmail.com
File Name: src/python/pants/option/global_options.py
Class Name: GlobalOptionsRegistrar
Method Name: register_options


Project Name: home-assistant/home-assistant
Commit Name: 0eee544d1709ce3029f17fc2d21a8cd2378438f7
Time: 2017-08-28
Author: jordy@fusion-ict.nl
File Name: homeassistant/components/rainbird.py
Class Name:
Method Name: setup


Project Name: hachmannlab/chemml
Commit Name: 0feb0994460a89b01e3b8c13ba37c0b2ed8d8463
Time: 2019-01-15
Author: gvishwak@buffalo.edu
File Name: chemml/search/genetic_algorithm.py
Class Name: GeneticAlgorithm
Method Name: initialize