@@ -33,21 +33,21 @@ Taking the `gdemo` model above as an example, the macro-based definition can be
33
33
using DynamicPPL
34
34
35
35
# Create the model function.
36
- function gdemo2(model, varinfo, context, x)
36
+ function gdemo2(model, varinfo, x)
37
37
# Assume s² has an InverseGamma distribution.
38
38
s², varinfo = DynamicPPL.tilde_assume!!(
39
- context, InverseGamma(2, 3), @varname(s²), varinfo
39
+ model. context, InverseGamma(2, 3), @varname(s²), varinfo
40
40
)
41
41
42
42
# Assume m has a Normal distribution.
43
43
m, varinfo = DynamicPPL.tilde_assume!!(
44
- context, Normal(0, sqrt(s²)), @varname(m), varinfo
44
+ model. context, Normal(0, sqrt(s²)), @varname(m), varinfo
45
45
)
46
46
47
47
# Observe each value of x[i] according to a Normal distribution.
48
48
for i in eachindex(x)
49
49
_retval, varinfo = DynamicPPL.tilde_observe!!(
50
- context, Normal(m, sqrt(s²)), x[i], @varname(x[i]), varinfo
50
+ model. context, Normal(m, sqrt(s²)), x[i], @varname(x[i]), varinfo
51
51
)
52
52
end
53
53
0 commit comments