Skip to content

Commit 737bf39

Browse files
VIVelevpatrick-kidger
authored andcommitted
Fix manual-stepping example (#297)
1 parent 104936a commit 737bf39

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/usage/manual-stepping.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ In the following example, we solve an ODE using [`diffrax.Tsit5`][], and print o
1111
See the [Abstract solvers](../api/solvers/abstract_solvers.md) page for a reference on the solver methods (`init`, `step`) used here.
1212

1313
```python
14+
import jax.numpy as jnp
1415
from diffrax import ODETerm, Tsit5
1516

1617
vector_field = lambda t, y, args: -y
@@ -20,7 +21,7 @@ solver = Tsit5()
2021
t0 = 0
2122
dt0 = 0.05
2223
t1 = 1
23-
y0 = 1
24+
y0 = jnp.array(1.0)
2425
args = None
2526

2627
tprev = t0

0 commit comments

Comments
 (0)