@@ -76,7 +76,8 @@ be a Dual number. This causes the error. To fix it:
7676 1 . Specify the ` autodiff ` to be ` AutoFiniteDiff `
7777
7878 ``` @example dual_error_faq
79- sol = solve(prob_oop, LevenbergMarquardt(; autodiff = AutoFiniteDiff());
79+ import ADTypes
80+ sol = solve(prob_oop, LevenbergMarquardt(; autodiff = ADTypes.AutoFiniteDiff());
8081 maxiters = 10000, abstol = 1e-8)
8182 ```
8283
@@ -110,6 +111,7 @@ internally. See this simple example:
110111```@example type_unstable
111112import NonlinearSolve as NLS
112113import InteractiveUtils
114+ import ADTypes
113115
114116f(u, p) = @. u^2 - p
115117
@@ -134,7 +136,7 @@ nothing # hide
134136Again Type-Stable! Now let's try using a regular array:
135137
136138``` @example type_unstable
137- prob = NonlinearProblem(f, [1.0, 2.0], 2.0)
139+ prob = NLS. NonlinearProblem(f, [1.0, 2.0], 2.0)
138140
139141InteractiveUtils.@code_warntype NLS.solve(prob, NLS.NewtonRaphson())
140142nothing # hide
@@ -145,10 +147,10 @@ it will be dynamic and lead to dynamic dispatch. To fix this, we directly specif
145147chunksize:
146148
147149``` @example type_unstable
148- InteractiveUtils.@code_warntype solve(
150+ InteractiveUtils.@code_warntype NLS. solve(
149151 prob,
150- NewtonRaphson(;
151- autodiff = AutoForwardDiff(; chunksize = NonlinearSolve.pickchunksize(prob.u0))
152+ NLS. NewtonRaphson(;
153+ autodiff = ADTypes. AutoForwardDiff(; chunksize = NonlinearSolve.pickchunksize(prob.u0))
152154 )
153155)
154156nothing # hide
0 commit comments