@@ -438,7 +438,9 @@ def take_best_candidates(
438438
439439 # Sort candidates by match quality (.corr)
440440 src .sort (order = "corr" ) # by corr
441- src = src [::- 1 ] # reverse order
441+ src [:] = np .flip (
442+ src , axis = 0
443+ ) # reverse order in-place while preserving recarray type
442444
443445 # Take candidates from the top to the bottom of the sorted list
444446 # Only take if none of the corresponding targets have been used
@@ -665,7 +667,7 @@ def correspondences(
665667 )
666668
667669 match_counts [1 ] = take_best_candidates (
668- con0 , con [match_counts [3 ] :], cpar .num_cams , tim
670+ con0 , con [match_counts [3 ] :]. view ( np . recarray ) , cpar .num_cams , tim
669671 )
670672 match_counts [3 ] += match_counts [1 ]
671673
@@ -675,7 +677,7 @@ def correspondences(
675677 corr_list , cpar .num_cams , frm .num_targets , vpar .corrmin , con0 , 4 * nmax , tim
676678 )
677679 match_counts [2 ] = take_best_candidates (
678- con0 , con [match_counts [3 ] :], cpar .num_cams , tim
680+ con0 , con [match_counts [3 ] :]. view ( np . recarray ) , cpar .num_cams , tim
679681 )
680682 match_counts [3 ] += match_counts [2 ]
681683
0 commit comments