@@ -282,7 +282,7 @@ def unique_genes_by_space(self,
282282
283283 Args:
284284 new_solution (list): A solution containing genes with duplicate values.
285- gene_type (type): The data type of the gene (e.g., int, float).
285+ gene_type (type): The data type of the all the genes (e.g., int, float).
286286 not_unique_indices (list): The indices of genes with duplicate values.
287287 num_trials (int): The maximum number of attempts to resolve duplicates for each gene. Only works for floating-point numbers.
288288
@@ -417,7 +417,7 @@ def unique_gene_by_space(self,
417417 value_from_space = numpy .random .choice (numpy .arange (start = curr_gene_space ['low' ],
418418 stop = curr_gene_space ['high' ],
419419 step = curr_gene_space ['step' ]),
420- size = 1 )
420+ size = 1 )[ 0 ]
421421 else :
422422 value_from_space = numpy .random .uniform (low = curr_gene_space ['low' ],
423423 high = curr_gene_space ['high' ],
@@ -479,7 +479,7 @@ def unique_gene_by_space(self,
479479 value_from_space = numpy .random .choice (numpy .arange (start = self .gene_space ['low' ],
480480 stop = self .gene_space ['high' ],
481481 step = self .gene_space ['step' ]),
482- size = 1 )
482+ size = 1 )[ 0 ]
483483 else :
484484 value_from_space = numpy .random .uniform (low = self .gene_space ['low' ],
485485 high = self .gene_space ['high' ],
0 commit comments