Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ambiguity error when solving NonlinearProblem on master #497

Closed
AayushSabharwal opened this issue Nov 10, 2024 · 0 comments · Fixed by #498
Closed

Ambiguity error when solving NonlinearProblem on master #497

AayushSabharwal opened this issue Nov 10, 2024 · 0 comments · Fixed by #498
Labels
bug Something isn't working

Comments

@AayushSabharwal
Copy link
Member

I get an ambiguity error when solving a NonlinearProblem on master. Still working on an MWE, but opening the issue in case it's immediately apparent what the ambiguity is:

ERROR: MethodError: __solve(::NonlinearProblem{…}, ::NonlinearSolvePolyAlgorithm{…}) is ambiguous.

Candidates:
  __solve(prob::SciMLBase.AbstractNonlinearProblem, alg::NonlinearSolvePolyAlgorithm{Val{N}}, args...; stats, alias_u0, verbose, kwargs...) where N
    @ NonlinearSolveBase ~/Julia/SciML/NonlinearSolve.jl/lib/NonlinearSolveBase/src/solve.jl:106
  __solve(prob::Union{NonlinearLeastSquaresProblem{<:Union{Number, var"#s15"} where var"#s15"<:AbstractArray, iip, <:Union{var"#s14", var"#s13"} where {var"#s14"<:ForwardDiff.Dual{T, V, P}, var"#s13"<:(AbstractArray{<:ForwardDiff.Dual{T, V, P}})}} where {iip, T, V, P}, NonlinearProblem{<:Union{Number, var"#s15"} where var"#s15"<:AbstractArray, iip, <:Union{var"#s14", var"#s13"} where {var"#s14"<:ForwardDiff.Dual{T, V, P}, var"#s13"<:(AbstractArray{<:ForwardDiff.Dual{T, V, P}})}} where {iip, T, V, P}}, alg::NonlinearSolveBase.AbstractNonlinearSolveAlgorithm, args...; kwargs...)
    @ NonlinearSolve ~/Julia/SciML/NonlinearSolve.jl/src/forward_diff.jl:14
  __solve(prob::Union{NonlinearLeastSquaresProblem{<:Union{Number, var"#s15"} where var"#s15"<:AbstractArray, iip, <:Union{var"#s14", var"#s13"} where {var"#s14"<:ForwardDiff.Dual{T, V, P}, var"#s13"<:(AbstractArray{<:ForwardDiff.Dual{T, V, P}})}} where {iip, T, V, P}, NonlinearProblem{<:Union{Number, var"#s15"} where var"#s15"<:AbstractArray, iip, <:Union{var"#s14", var"#s13"} where {var"#s14"<:ForwardDiff.Dual{T, V, P}, var"#s13"<:(AbstractArray{<:ForwardDiff.Dual{T, V, P}})}} where {iip, T, V, P}}, alg::NonlinearSolvePolyAlgorithm, args...; kwargs...)
    @ NonlinearSolve ~/Julia/SciML/NonlinearSolve.jl/src/forward_diff.jl:14

Possible fix, define
  __solve(::Union{…}, ::NonlinearSolvePolyAlgorithm{…}, ::Vararg{…}) where N
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant