Skip to content

Commit 069bc40

Browse files
committed
fix the erroring test
1 parent f9d3431 commit 069bc40

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/ad.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,12 @@ using DynamicPPL.TestUtils.AD: run_ad, WithExpectedResult, NoTest
9191
# create latent variable -- Have to use typeof(α) here to ensure that
9292
# AD works fine. Not sure if this is a generally good workaround.
9393
x = Vector{typeof(α)}(undef, TT)
94+
# As an alternative to the above, we could do this:
95+
# using Accessors
96+
# x = Accessors.set(x, (Accessors.@optic _[1]), α)
9497
x[1] = α
9598
for t in 2:TT
99+
# and likewise for this line -- use Accessors
96100
x[t] = x[t - 1] + η[t - 1] * τ
97101
end
98102
# measurement model

0 commit comments

Comments
 (0)