pg.geno.ConditionalKey

Accessible via pg.geno.ConditionalKey.

class ConditionalKey(index, num_choices)[source]

Bases: object

Key used in pg.KeyPath to represent conditional element.

For example, a[=1].b means a.b when a == 1. a[0][=0][0] means a[0][0] when a[0] == 0.

Attributes:

index

Return selected index of current condition.

num_choices

Returns number of choices of current condition.

property index: int[source]

Return selected index of current condition.

property num_choices: int[source]

Returns number of choices of current condition.