Skip to content

Commit f67dfcd

Browse files
Merge pull request #471 from RocketPy-Team/bug/find-input-root
BUG: Fix find_input() Function to Return a Single Value
2 parents 0c86edd + 2e9a167 commit f67dfcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rocketpy/mathutils/function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2648,7 +2648,7 @@ def find_input(self, val, start, tol=1e-4):
26482648
The value of the input which gives the output closest to val.
26492649
"""
26502650
return optimize.root(
2651-
lambda x: self.get_value(x) - val,
2651+
lambda x: self.get_value(x)[0] - val,
26522652
start,
26532653
tol=tol,
26542654
).x[0]

0 commit comments

Comments
 (0)