Skip to content

Commit

Permalink
Fix typos in gp.cxOnePointLeafBiased() docstring and in line comment
Browse files Browse the repository at this point in the history
  • Loading branch information
loganthomas committed Oct 2, 2019
1 parent e51d321 commit 4b908bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deap/gp.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ def cxOnePointLeafBiased(ind1, ind2, termpb):
:param ind1: First typed tree participating in the crossover.
:param ind2: Second typed tree participating in the crossover.
:param termpb: The probability of chosing a terminal node (leaf).
:param termpb: The probability of choosing a terminal node (leaf).
:returns: A tuple of two typed trees.
When the nodes are strongly typed, the operator makes sure the
Expand All @@ -699,7 +699,7 @@ def cxOnePointLeafBiased(ind1, ind2, termpb):
# No crossover on single node tree
return ind1, ind2

# Determine wether we keep terminals or primitives for each individual
# Determine whether to keep terminals or primitives for each individual
terminal_op = partial(eq, 0)
primitive_op = partial(lt, 0)
arity_op1 = terminal_op if random.random() < termpb else primitive_op
Expand Down

0 comments on commit 4b908bd

Please sign in to comment.