@@ -1844,8 +1844,8 @@ def roulette_wheel_selection(self, fitness, num_parents):
1844
1844
if fitness_sum == 0 :
1845
1845
raise ZeroDivisionError ("Cannot proceed because the sum of fitness values is zero. Cannot divide by zero." )
1846
1846
probs = fitness / fitness_sum
1847
- probs_start = numpy .zeros (probs .shape , dtype = numpy . float ) # An array holding the start values of the ranges of probabilities.
1848
- probs_end = numpy .zeros (probs .shape , dtype = numpy . float ) # An array holding the end values of the ranges of probabilities.
1847
+ probs_start = numpy .zeros (probs .shape , dtype = float ) # An array holding the start values of the ranges of probabilities.
1848
+ probs_end = numpy .zeros (probs .shape , dtype = float ) # An array holding the end values of the ranges of probabilities.
1849
1849
1850
1850
curr = 0.0
1851
1851
@@ -1888,8 +1888,8 @@ def stochastic_universal_selection(self, fitness, num_parents):
1888
1888
if fitness_sum == 0 :
1889
1889
raise ZeroDivisionError ("Cannot proceed because the sum of fitness values is zero. Cannot divide by zero." )
1890
1890
probs = fitness / fitness_sum
1891
- probs_start = numpy .zeros (probs .shape , dtype = numpy . float ) # An array holding the start values of the ranges of probabilities.
1892
- probs_end = numpy .zeros (probs .shape , dtype = numpy . float ) # An array holding the end values of the ranges of probabilities.
1891
+ probs_start = numpy .zeros (probs .shape , dtype = float ) # An array holding the start values of the ranges of probabilities.
1892
+ probs_end = numpy .zeros (probs .shape , dtype = float ) # An array holding the end values of the ranges of probabilities.
1893
1893
1894
1894
curr = 0.0
1895
1895
0 commit comments