diff --git a/psyneulink/core/components/functions/nonstateful/optimizationfunctions.py b/psyneulink/core/components/functions/nonstateful/optimizationfunctions.py index d64947cc55f..db49504e52b 100644 --- a/psyneulink/core/components/functions/nonstateful/optimizationfunctions.py +++ b/psyneulink/core/components/functions/nonstateful/optimizationfunctions.py @@ -1189,6 +1189,8 @@ def reset(self, default_variable=None, objective_function=None, context=None, ** if self.owner: owner_str = ' of {self.owner.name}' + else: + owner_str = '' # Get bounds from search_space if it has any non-None entries if any(i is not None for i in self.search_space): @@ -1243,9 +1245,9 @@ def reset(self, default_variable=None, objective_function=None, context=None, ** # Array specified for upper bound, so replace any None's with +inf upper = np.array([[float('inf')] if n[0] is None else n for n in upper.reshape(sample_len,1)]) - if not all(lower= corresponding upper for one or " + f"{owner_str} resulted in lower > corresponding upper for one or " f"more elements (lower: {lower.tolist()}; uuper: {upper.tolist()}).") bounds = (lower,upper)