From a6944551aa36b7a7ef99a5e30e5f5ab95716f100 Mon Sep 17 00:00:00 2001 From: Marvin Erdmann <106394656+Marvmann@users.noreply.github.com> Date: Thu, 21 Sep 2023 12:15:07 +0200 Subject: [PATCH] Bug fixing in postprocess Numpy array in if-statement lead to error. Bug fixed by checking if object is None. --- src/modules/applications/optimization/Optimization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/applications/optimization/Optimization.py b/src/modules/applications/optimization/Optimization.py index 90375034..9a268947 100644 --- a/src/modules/applications/optimization/Optimization.py +++ b/src/modules/applications/optimization/Optimization.py @@ -123,7 +123,7 @@ def postprocess(self, input_data: any, config: dict, **kwargs) -> (any, float): solution_validity = False time_to_process_solution = None time_to_validation = None - if solution_validity and processed_solution: + if solution_validity and (processed_solution is not None): solution_quality, time_to_evaluation = self.evaluate(processed_solution) else: solution_quality = None