Skip to content

Commit fca6058

Browse files
committed
Reformat docstring
1 parent 2aa059d commit fca6058

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

pygad/utils/crossover.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,15 @@ def __init__():
1313
def single_point_crossover(self, parents, offspring_size):
1414

1515
"""
16-
Applies the single-point crossover. It selects a point randomly at which crossover takes place between the pairs of parents.
17-
It accepts 2 parameters:
18-
-parents: The parents to mate for producing the offspring.
19-
-offspring_size: The size of the offspring to produce.
20-
It returns an array the produced offspring.
16+
Applies single-point crossover between pairs of parents.
17+
This function selects a random point at which crossover occurs between the parents, generating offspring.
18+
19+
Parameters:
20+
parents (array-like): The parents to mate for producing the offspring.
21+
offspring_size (int): The number of offspring to produce.
22+
23+
Returns:
24+
array-like: An array containing the produced offspring.
2125
"""
2226

2327
if self.gene_type_single == True:

0 commit comments

Comments
 (0)