Skip to content

Commit 15ba760

Browse files
jeanconntaldcroft
andauthored
Use better indexing in optimization (suggestion @taldcroft)
Co-authored-by: Tom Aldcroft <taldcroft@gmail.com>
1 parent 7103f01 commit 15ba760

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

proseco/catalog.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -609,9 +609,9 @@ def optimize_acqs_fids(self, initial_guide_cands=None, **kwargs):
609609
)
610610
if np.any(passable):
611611
fid_sets_passable = fid_sets[passable]
612-
best_idx = np.argmax(fid_sets_passable["P2"])
613-
best_P2 = fid_sets_passable["P2"][best_idx]
614-
best_idx = np.where(passable)[0][best_idx]
612+
best_idx_passable = np.argmax(fid_sets_passable["P2"])
613+
best_P2 = fid_sets_passable["P2"][best_idx_passable]
614+
best_idx = np.where(passable)[0][best_idx_passable]
615615

616616
# If none passable then just get the best P2
617617
else:

0 commit comments

Comments
 (0)