From 6583fbfd7d6efa672bfcb74186f6f4060506dd66 Mon Sep 17 00:00:00 2001 From: Tom Barbette Date: Sat, 16 Nov 2024 17:39:52 +0100 Subject: [PATCH] ZLTExp: Fix corner case --- npf/expdesign/zltexp.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/npf/expdesign/zltexp.py b/npf/expdesign/zltexp.py index 55a9f57..8da9ef4 100644 --- a/npf/expdesign/zltexp.py +++ b/npf/expdesign/zltexp.py @@ -127,6 +127,12 @@ def __next__(self): maybe_achievable_inputs = list(filter(lambda x : x <= max_r*self.margin, self.executable_values)) left_to_try = set(maybe_achievable_inputs).difference(vals_for_current.keys()) + if len(left_to_try) == 0: + #There's no more points to try, we could never find a ZLT + self.current = None + return self.__next__() + + #Step 3...K : try to get an acceptable rate. This step might be skipped if we got an acceptable rate already if not acceptable_rates: