Skip to content

Commit b1373d3

Browse files
Merge pull request #7 from JuliaComputing/YingboMa-patch-1
Fix the readme example
2 parents cd00b8e + 8e40226 commit b1373d3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Fast implementations of root finding algorithms in Julia that satisfy the SciML common interface.
44

55
```julia
6-
using NonlinearSolve
6+
using NonlinearSolve, StaticArrays
77

88
f(u,p) = u .* u .- 2
99
u0 = @SVector[1.0, 1.0]
@@ -41,9 +41,11 @@ f(u, p) = u .* u .- 2.0
4141
u0 = (1.0, 2.0) # brackets
4242
probB = NonlinearProblem(f, u0)
4343
solver = init(probB, Falsi()) # Can iterate the solver object
44-
solve!(solver)
44+
solver = solve!(solver)
4545
```
4646

47+
Note that the `solver` object is actually immutable since we want to make it live on the stack for the sake of performance.
48+
4749
## Roadmap
4850

4951
The current algorithms should support automatic differentiation, though improved adjoint overloads are planned

0 commit comments

Comments
 (0)