Commit 3e2b35e
authored
Fix multi_stop_search on cupy and dask+cupy backends (#3637)
* Handle cupy and dask+cupy segments in multi_stop_search (#3630)
Segment extraction assumed .get() meant cupy and everything else was
safe for np.asarray(seg.values), which crashes on dask-of-cupy results
(implicit cupy->numpy conversion). Route all backends through a
_segment_to_numpy helper (compute dask, then .get() cupy) in both the
stitching loop and _optimize_waypoint_order, and convert the stitched
output back to the input's array type so cupy and dask inputs no longer
come back numpy-backed. Fixes the no-op conversion expression in
test_multi_stop_cupy_matches_numpy and adds a dask+cupy test.
* Document output array-type preservation in multi_stop_search (#3630)1 parent 503bad8 commit 3e2b35e
2 files changed
Lines changed: 69 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1306 | 1306 | | |
1307 | 1307 | | |
1308 | 1308 | | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
1309 | 1323 | | |
1310 | 1324 | | |
1311 | 1325 | | |
| |||
1328 | 1342 | | |
1329 | 1343 | | |
1330 | 1344 | | |
1331 | | - | |
1332 | | - | |
1333 | | - | |
1334 | | - | |
1335 | | - | |
| 1345 | + | |
1336 | 1346 | | |
1337 | 1347 | | |
1338 | 1348 | | |
| |||
1395 | 1405 | | |
1396 | 1406 | | |
1397 | 1407 | | |
1398 | | - | |
| 1408 | + | |
| 1409 | + | |
1399 | 1410 | | |
1400 | 1411 | | |
1401 | 1412 | | |
| |||
1474 | 1485 | | |
1475 | 1486 | | |
1476 | 1487 | | |
1477 | | - | |
1478 | | - | |
1479 | | - | |
1480 | | - | |
1481 | | - | |
| 1488 | + | |
1482 | 1489 | | |
1483 | 1490 | | |
1484 | 1491 | | |
| |||
1508 | 1515 | | |
1509 | 1516 | | |
1510 | 1517 | | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
1511 | 1529 | | |
1512 | 1530 | | |
1513 | 1531 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1078 | 1078 | | |
1079 | 1079 | | |
1080 | 1080 | | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
1081 | 1084 | | |
1082 | 1085 | | |
1083 | 1086 | | |
| |||
1099 | 1102 | | |
1100 | 1103 | | |
1101 | 1104 | | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
1102 | 1109 | | |
1103 | | - | |
| 1110 | + | |
1104 | 1111 | | |
1105 | 1112 | | |
1106 | 1113 | | |
1107 | 1114 | | |
1108 | 1115 | | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
1109 | 1148 | | |
1110 | 1149 | | |
1111 | 1150 | | |
| |||
0 commit comments