Skip to content

Commit 931fabe

Browse files
authored
Fix markdown list in faq.md (#538)
1 parent 05ca219 commit 931fabe

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

docs/src/basics/faq.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -71,29 +71,29 @@ differentiate the function based on the input types. However, this function has
7171
`xx = [1.0, 2.0, 3.0, 4.0]` followed by a `xx[1] = var[1] - v_true[1]` where `var` might
7272
be a Dual number. This causes the error. To fix it:
7373

74-
1. Specify the `autodiff` to be `AutoFiniteDiff`
74+
1. Specify the `autodiff` to be `AutoFiniteDiff`
7575

76-
```@example dual_error_faq
77-
sol = solve(prob_oop, LevenbergMarquardt(; autodiff = AutoFiniteDiff());
78-
maxiters = 10000, abstol = 1e-8)
79-
```
76+
```@example dual_error_faq
77+
sol = solve(prob_oop, LevenbergMarquardt(; autodiff = AutoFiniteDiff());
78+
maxiters = 10000, abstol = 1e-8)
79+
```
8080

81-
This worked but, Finite Differencing is not the recommended approach in any scenario.
81+
This worked but, Finite Differencing is not the recommended approach in any scenario.
8282

83-
2. Rewrite the function to use
84-
[PreallocationTools.jl](https://github.com/SciML/PreallocationTools.jl) or write it as
83+
2. Rewrite the function to use
84+
[PreallocationTools.jl](https://github.com/SciML/PreallocationTools.jl) or write it as
8585

86-
```@example dual_error_faq
87-
function fff_correct(var, p)
88-
v_true = [1.0, 0.1, 2.0, 0.5]
89-
xx = eltype(var)[1.0, 2.0, 3.0, 4.0]
90-
xx[1] = var[1] - v_true[1]
91-
return xx - v_true
92-
end
86+
```@example dual_error_faq
87+
function fff_correct(var, p)
88+
v_true = [1.0, 0.1, 2.0, 0.5]
89+
xx = eltype(var)[1.0, 2.0, 3.0, 4.0]
90+
xx[1] = var[1] - v_true[1]
91+
return xx - v_true
92+
end
9393
94-
prob_oop = NonlinearLeastSquaresProblem{false}(fff_correct, v_init)
95-
sol = solve(prob_oop, LevenbergMarquardt(); maxiters = 10000, abstol = 1e-8)
96-
```
94+
prob_oop = NonlinearLeastSquaresProblem{false}(fff_correct, v_init)
95+
sol = solve(prob_oop, LevenbergMarquardt(); maxiters = 10000, abstol = 1e-8)
96+
```
9797

9898
## I thought NonlinearSolve.jl was type-stable and fast. But it isn't, why?
9999

0 commit comments

Comments
 (0)