Skip to content

Commit

Permalink
Merge pull request #471 from RocketPy-Team/bug/find-input-root
Browse files Browse the repository at this point in the history
BUG: Fix find_input() Function to Return a Single Value
  • Loading branch information
Gui-FernandesBR authored Nov 19, 2023
2 parents 0c86edd + 2e9a167 commit f67dfcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rocketpy/mathutils/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -2648,7 +2648,7 @@ def find_input(self, val, start, tol=1e-4):
The value of the input which gives the output closest to val.
"""
return optimize.root(
lambda x: self.get_value(x) - val,
lambda x: self.get_value(x)[0] - val,
start,
tol=tol,
).x[0]
Expand Down

0 comments on commit f67dfcd

Please sign in to comment.