You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# If there are no possible values for the gene 3 with index 3 to solve the duplicate, try to change the value of the other gene with index 2.
3081
-
iflen(not_unique_indices) >0:
3053
+
# If there exist duplicate genes, then changing either of the 2 duplicating genes (with indices 2 and 3) will not solve the problem.
3054
+
# This problem can be solved by randomly changing one of the non-duplicating genes that may make a room for a unique value in one the 2 duplicating genes.
3055
+
# For example, if gene_space=[[3, 0, 1], [4, 1, 2], [0, 2], [3, 2, 0]] and the solution is [3 2 0 0], then the values of the last 2 genes duplicate.
3056
+
# There are no possible changes in the last 2 genes to solve the problem. But it could be solved by changing the second gene from 2 to 4.
3057
+
# As a result, any of the last 2 genes can take the value 2 and solve the duplicates.
# If there exist duplicate genes, then changing either of the 2 duplicating genes (with indices 2 and 3) will not solve the problem.
3090
-
# This problem can be solved by randomly changing one of the non-duplicating genes that may make a room for a unique value in one the 2 duplicating genes.
3091
-
# For example, if gene_space=[[3, 0, 1], [4, 1, 2], [0, 2], [3, 2, 0]] and the solution is [3 2 0 0], then the values of the last 2 genes duplicate.
3092
-
# There are no possible changes in the last 2 genes to solve the problem. But it could be solved by changing the second gene from 2 to 4.
3093
-
# As a result, any of the last 2 genes can take the value 2 and solve the duplicates.
3068
+
# Do another try if there exist duplicate genes.
3069
+
# If there are no possible values for the gene 3 with index 3 to solve the duplicate, try to change the value of the other gene with index 2.
# For non-integer steps, the numpy.arange() function returns zeros id the dtype parameter is set to an integer data type. So, this returns zeros if step is non-integer and dtype is set to an int data type: numpy.arange(min_val, max_val, step, dtype=gene_type[0])
3158
-
# To solve this issue, the data type casting will not be handled inside numpy.arange(). The range is generated by numpy.arange() and then the data type is converted using the numpy.asarray() function.
# For non-integer steps, the numpy.arange() function returns zeros id the dtype parameter is set to an integer data type. So, this returns zeros if step is non-integer and dtype is set to an int data type: numpy.arange(min_val, max_val, step, dtype=gene_type[0])
3137
+
# To solve this issue, the data type casting will not be handled inside numpy.arange(). The range is generated by numpy.arange() and then the data type is converted using the numpy.asarray() function.
0 commit comments