pg.geno.manyof¶
Accessible via pg.geno.manyof
.
- manyof(num_choices, candidates, distinct=True, sorted=False, literal_values=None, hints=None, location=, name=None)[source]¶
Returns a multi-choice specification.
It creates the genotype for
pg.manyof
.Example:
spec = pg.geno.manyof(2, [ pg.geno.constant(), pg.geno.constant(), pg.geno.oneof([ pg.geno.constant(), pg.geno.constant() ]) ])
- Return type:
- Parameters:
num_choices – Number of choices.
candidates – A list of
pg.geno.Space
objects as the candidates.distinct – If True, the decisions for the multiple choices should be distinct from each other (based on the value of selected indices).
sorted – If Ture, the decisions returned should be sorted by the values of selected indices.
literal_values – An optional list of string, integer, or float as the literal values for the candidates for display purpose.
hints – An optional hint object.
location – A
pg.KeyPath
object that indicates the location of the decision point.name – An optional global unique name for identifying this decision point.
- Returns:
A
pg.geno.Choices
object.