Skip to content

Commit e437b0b

Browse files
fix: fix single root solve implementation
1 parent b6a64cb commit e437b0b

File tree

1 file changed

+4
-1
lines changed
  • lib/NonlinearSolveHomotopyContinuation/src

1 file changed

+4
-1
lines changed

lib/NonlinearSolveHomotopyContinuation/src/solve.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,10 @@ function CommonSolve.solve(prob::NonlinearProblem, alg::HomotopyContinuationJL{f
113113
fu0 = NonlinearSolveBase.Utils.evaluate_f(prob, u0_p)
114114

115115
homotopy = GuessHomotopy(hcsys, fu0)
116-
orig_sol = HC.solve(homotopy, [fu0]; alg.kwargs..., kwargs...)
116+
if u0_p isa Number
117+
u0_p = [u0_p]
118+
end
119+
orig_sol = HC.solve(homotopy, [u0_p]; alg.kwargs..., kwargs...)
117120
realsols = HC.results(orig_sol; only_real = true)
118121

119122
# no real solutions or infeasible solution

0 commit comments

Comments
 (0)