Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ and `p` the parameter object.

The returned function must have the signature required by `HomotopySystemWrapper`.
"""
function construct_jacobian(f, autodiff, variant, u0, p)
function construct_jacobian(f::F, autodiff, variant, u0, p) where F
if variant == Scalar
tmp = reinterpret(Float64, Vector{ComplexF64}(undef, 1))
else
Expand Down Expand Up @@ -182,7 +182,7 @@ end

Construct an `EnzymeJacobian` function.
"""
function construct_jacobian(f, autodiff::AutoEnzyme, variant, u0, p)
function construct_jacobian(f::F, autodiff::AutoEnzyme, variant, u0, p) where F
if variant == Scalar
prep = DI.prepare_derivative(f, autodiff, u0, DI.Constant(p), strict = Val(false))
else
Expand Down
4 changes: 2 additions & 2 deletions lib/NonlinearSolveSciPy/src/NonlinearSolveSciPy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ end
"""
Internal: wrap a Julia residual function into a Python callable
"""
function _make_py_residual(f, p)
function _make_py_residual(f::F, p) where F
return pyfunc(x_py -> begin
x = Vector{Float64}(x_py)
r = f(x, p)
Expand All @@ -105,7 +105,7 @@ end
"""
Internal: wrap a Julia scalar function into a Python callable
"""
function _make_py_scalar(f, p)
function _make_py_scalar(f::F, p) where F
return pyfunc(x_py -> begin
x = Float64(x_py)
return f(x, p)
Expand Down
2 changes: 1 addition & 1 deletion lib/SimpleNonlinearSolve/src/trust_region.jl
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ function SciMLBase.__solve(
return SciMLBase.build_solution(prob, alg, x, fx; retcode = ReturnCode.MaxIters)
end

function dogleg_method!!(cache, J, f, g, Δ)
function dogleg_method!!(cache, J, f::F, g, Δ) where F
(; δsd, δN_δsd, δN) = cache

# Compute the Newton step
Expand Down
Loading