Skip to content

Commit

Permalink
Bug fixing in postprocess
Browse files Browse the repository at this point in the history
Numpy array in if-statement lead to error. Bug fixed by checking if object is None.
  • Loading branch information
Marvmann authored Sep 21, 2023
1 parent 63e70b8 commit a694455
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/applications/optimization/Optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a694455

Please sign in to comment.