Skip to content

Commit 0a07521

Browse files
Merge pull request #217 from odow/patch-1
Fix ForwardDiff error in intro tutorial
2 parents 3f97bc3 + 4d44ca0 commit 0a07521

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/src/tutorials/intro.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ is given below:
4646
We can also explore other methods in a similar way:
4747

4848
```julia
49-
f = OptimizationFunction(rosenbrock, GalacticOptim.AutoForwardDiff())
50-
prob = OptimizationProblem(f, x0, p)
51-
sol = solve(prob,BFGS())
49+
using ForwardDiff
50+
f = OptimizationFunction(rosenbrock, GalacticOptim.AutoForwardDiff())
51+
prob = OptimizationProblem(f, x0, p)
52+
sol = solve(prob,BFGS())
5253
```
5354
For instance, the above optimization task produces the following output:
5455

0 commit comments

Comments
 (0)