Skip to content

Commit

Permalink
Forced casting to np.array of the opti output.
Browse files Browse the repository at this point in the history
  • Loading branch information
S-Dafarra committed Apr 6, 2023
1 parent e5614fe commit 3310a86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hippopt/base/opti_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def _generate_solution_output(
)
):
var = dataclasses.asdict(variables)[field.name]
output.__setattr__(field.name, self._opti_solution.value(var))
output.__setattr__(field.name, np.array(self._opti_solution.value(var)))
continue

composite_variable = variables.__getattribute__(field.name)
Expand Down

0 comments on commit 3310a86

Please sign in to comment.