Skip to content

Commit e2aa7b7

Browse files
Revert "Filter lb and ub from scipy kwargs in NonlinearSolveSciPy"
This reverts commit 8fd05da.
1 parent 18862db commit e2aa7b7

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/NonlinearSolveSciPy/src/NonlinearSolveSciPy.jl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ function SciMLBase.__solve(
135135
end
136136

137137
# Filter out Julia-specific kwargs that scipy doesn't understand
138-
# lb and ub are extracted from prob directly, not passed as kwargs
139-
scipy_kwargs = Tuple(k => v for (k, v) in pairs(kwargs) if k (:alias, :verbose, :lb, :ub))
138+
scipy_kwargs = Tuple(k => v for (k, v) in pairs(kwargs) if k (:alias, :verbose))
140139

141140
# Call scipy with conditional bounds argument
142141
if bounds === nothing
@@ -190,8 +189,7 @@ function SciMLBase.__solve(prob::SciMLBase.NonlinearProblem, alg::SciPyRoot;
190189
tol = abstol === nothing ? nothing : abstol
191190

192191
# Filter out Julia-specific kwargs that scipy doesn't understand
193-
# lb and ub are extracted from prob directly, not passed as kwargs
194-
scipy_kwargs = Tuple(k => v for (k, v) in pairs(kwargs) if k (:alias, :verbose, :lb, :ub))
192+
scipy_kwargs = Tuple(k => v for (k, v) in pairs(kwargs) if k (:alias, :verbose))
195193

196194
res = scipy_optimize[].root(py_f, collect(u0);
197195
method = alg.method,
@@ -230,8 +228,7 @@ function CommonSolve.solve(prob::SciMLBase.IntervalNonlinearProblem, alg::SciPyR
230228
a, b = prob.tspan
231229

232230
# Filter out Julia-specific kwargs that scipy doesn't understand
233-
# lb and ub are extracted from prob directly, not passed as kwargs
234-
scipy_kwargs = Tuple(k => v for (k, v) in pairs(kwargs) if k (:alias, :verbose, :lb, :ub))
231+
scipy_kwargs = Tuple(k => v for (k, v) in pairs(kwargs) if k (:alias, :verbose))
235232

236233
res = scipy_optimize[].root_scalar(py_f;
237234
method = alg.method,

0 commit comments

Comments
 (0)