mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-19 12:57:58 +00:00
fix duplicate code + add safety checks
This commit is contained in:
parent
7da681ec46
commit
6b92ee16ec
3 changed files with 4 additions and 6 deletions
|
|
@ -36,9 +36,6 @@ def select_best_index(
|
|||
raise ValueError("Primary and secondary score lists must have the same length.")
|
||||
|
||||
num_items = len(primary_scores)
|
||||
if num_items == 0: # Should be caught by the first check, but as a safeguard.
|
||||
raise ValueError("Input score lists cannot be empty.")
|
||||
|
||||
best_index = 0
|
||||
|
||||
for i in range(1, num_items):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue