ProblemFunction._compute_output and ProblemFunction._compute_jacobian have wrong return names
There is a confusing naming in both methods, I was trying to debug something and it required me to track input_value, I kept seeing the value change for no reason until I found this:
def _compute_output(self, input_value: NumberArray) -> NumberArray:
"""Compute the output value from an input value.
Args:
input_value: The input value.
Returns:
The output value.
"""
for func in self._output_evaluation_sequence:
input_value = func(input_value) # This should be output_value
return input_value # This should be output_value
Same here:
def _compute_jacobian(self, input_value: NumberArray) -> NumberArray:
"""Compute the Jacobian from an input value.
Args:
input_value: The input value.
Returns:
The Jacobian.
"""
for func in self._jacobian_evaluation_sequence:
input_value = func(input_value)
return input_value