Commit 4ee29b8
authored
Use utils.argmax_random_tie for best-individual selection in tsp.py (#1297)
np.argmax does not accept a key argument (TypeError) and np.argmax_random_tie does not exist (argmax_random_tie lives in utils). Use utils.argmax_random_tie in both the genetic algorithm and hill climbing loops of the TSP GUI. Fixes #1256.1 parent efaf99e commit 4ee29b8
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
| 297 | + | |
298 | 298 | | |
299 | 299 | | |
300 | 300 | | |
| |||
0 commit comments