Skip to content

Commit ba86ed8

Browse files
test: add test for SDDE with gfun returning Pytree
- Implements the TODO in `vbjax/tests/test_loops.py` to verify that `make_sdde` supports diffusion functions (`gfun`) that return Pytrees (e.g., namedtuples). - Adds a test case where `gfun` returns a `State` namedtuple, matching the state structure. - Verifies that the loop execution produces a trajectory with the correct Pytree structure and shapes.
1 parent 366da05 commit ba86ed8

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

vbjax/tests/test_loops.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ def f(xs: State, x: State, t, p):
111111
_, xs = loop(xs, None)
112112
assert xs.x.shape == z.x[:-(nh+1)].shape
113113

114-
# TODO test also w/ gfun generating pytree
115114
def g(x, p):
116115
return State(x=0.01, y=0.02)
117116
_, loop = vb.make_sdde(dt, nh, f, g)

0 commit comments

Comments
 (0)