Skip to content

Commit dc699a5

Browse files
committed
Fixed names of doctests for @returned_quantities
1 parent 0b081b7 commit dc699a5

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/submodel_macro.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ julia> @model function demo2(x, y)
277277
```
278278
279279
When we sample from the model `demo2(missing, 0.4)` random variable `x` will be sampled:
280-
```jldoctest submodel-return-quantities
280+
```jldoctest submodel-returned-quantities
281281
julia> vi = VarInfo(demo2(missing, 0.4));
282282
283283
julia> @varname(x) in keys(vi)
@@ -293,15 +293,15 @@ false
293293
294294
We can check that the log joint probability of the model accumulated in `vi` is correct:
295295
296-
```jldoctest submodel-return-quantities
296+
```jldoctest submodel-returned-quantities
297297
julia> x = vi[@varname(x)];
298298
299299
julia> getlogp(vi) ≈ logpdf(Normal(), x) + logpdf(Uniform(0, 1 + abs(x)), 0.4)
300300
true
301301
```
302302
303303
## With prefixing
304-
```jldoctest submodel-return-quantities-prefix; setup=:(using Distributions)
304+
```jldoctest submodel-returned-quantities-prefix; setup=:(using Distributions)
305305
julia> @model function demo1(x)
306306
x ~ Normal()
307307
return 1 + abs(x)
@@ -316,7 +316,7 @@ julia> @model function demo2(x, y, z)
316316
317317
When we sample from the model `demo2(missing, missing, 0.4)` random variables `sub1.x` and
318318
`sub2.x` will be sampled:
319-
```jldoctest submodel-return-quantities-prefix
319+
```jldoctest submodel-returned-quantities-prefix
320320
julia> vi = VarInfo(demo2(missing, missing, 0.4));
321321
322322
julia> @varname(var"sub1.x") in keys(vi)
@@ -328,7 +328,7 @@ true
328328
329329
Variables `a` and `b` are not tracked since they can be computed from the random variables `sub1.x` and
330330
`sub2.x` that were tracked when running `demo1`:
331-
```jldoctest submodel-return-quantities-prefix
331+
```jldoctest submodel-returned-quantities-prefix
332332
julia> @varname(a) in keys(vi)
333333
false
334334
@@ -338,7 +338,7 @@ false
338338
339339
We can check that the log joint probability of the model accumulated in `vi` is correct:
340340
341-
```jldoctest submodel-return-quantities-prefix
341+
```jldoctest submodel-returned-quantities-prefix
342342
julia> sub1_x = vi[@varname(var"sub1.x")];
343343
344344
julia> sub2_x = vi[@varname(var"sub2.x")];
@@ -352,7 +352,7 @@ true
352352
```
353353
354354
## Different ways of setting the prefix
355-
```jldoctest submodel-return-quantities-prefix-alts; setup=:(using DynamicPPL, Distributions)
355+
```jldoctest submodel-returned-quantities-prefix-alts; setup=:(using DynamicPPL, Distributions)
356356
julia> @model inner() = x ~ Normal()
357357
inner (generic function with 2 methods)
358358

0 commit comments

Comments
 (0)