File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -373,7 +373,11 @@ def max_distance(D):
373373 matches = []
374374
375375 candidate_idx = np .argmin (D )
376- while D [candidate_idx ] <= atol + max_distance and len (matches ) < max_matches :
376+ while (
377+ D [candidate_idx ] <= atol + max_distance
378+ and np .isfinite (D [candidate_idx ])
379+ and len (matches ) < max_matches
380+ ):
377381 matches .append ([D [candidate_idx ], candidate_idx ])
378382 core .apply_exclusion_zone (D , candidate_idx , excl_zone )
379383 candidate_idx = np .argmin (D )
Original file line number Diff line number Diff line change @@ -414,7 +414,11 @@ def max_distance(D):
414414 matches = []
415415
416416 candidate_idx = np .argmin (D )
417- while D [candidate_idx ] <= atol + max_distance and len (matches ) < max_matches :
417+ while (
418+ D [candidate_idx ] <= atol + max_distance
419+ and np .isfinite (D [candidate_idx ])
420+ and len (matches ) < max_matches
421+ ):
418422 matches .append ([D [candidate_idx ], candidate_idx ])
419423 core .apply_exclusion_zone (D , candidate_idx , excl_zone )
420424 candidate_idx = np .argmin (D )
You can’t perform that action at this time.
0 commit comments