### What problem does this PR solve? Improve the float compare for LocalAIRerank ### Type of change - [x] Refactoringtags/v0.20.2
| @@ -268,7 +268,7 @@ class LocalAIRerank(Base): | |||
| max_rank = np.max(rank) | |||
| # Avoid division by zero if all ranks are identical | |||
| if max_rank - min_rank != 0: | |||
| if not np.isclose(min_rank, max_rank, atol=1e-3): | |||
| rank = (rank - min_rank) / (max_rank - min_rank) | |||
| else: | |||
| rank = np.zeros_like(rank) | |||