Skip to content

Commit

Permalink
updated docstring for condition and fix to not use @submdoel
Browse files Browse the repository at this point in the history
  • Loading branch information
torfjelde committed Nov 27, 2024
1 parent 6e149a3 commit 933e4ed
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,14 @@ true
## Nested models
`condition` of course also supports the use of nested models through
the use of [`@submodel`](@ref).
the use of [`to_submodel`](@ref).
```jldoctest condition
julia> @model demo_inner() = m ~ Normal()
demo_inner (generic function with 2 methods)
julia> @model function demo_outer()
@submodel m = demo_inner()
m ~ to_submodel(demo_inner())
return m
end
demo_outer (generic function with 2 methods)
Expand All @@ -250,7 +250,7 @@ But one needs to be careful when prefixing variables in the nested models:
```jldoctest condition
julia> @model function demo_outer_prefix()
@submodel prefix="inner" m = demo_inner()
m ~ to_submodel(prefix(demo_inner(), "inner"))
return m
end
demo_outer_prefix (generic function with 2 methods)
Expand Down Expand Up @@ -578,14 +578,14 @@ true
## Nested models
`fix` of course also supports the use of nested models through
the use of [`@submodel`](@ref).
the use of [`to_submodel`](@ref).
```jldoctest fix
julia> @model demo_inner() = m ~ Normal()
demo_inner (generic function with 2 methods)
julia> @model function demo_outer()
@submodel m = demo_inner()
m ~ to_submodel(demo_inner())
return m
end
demo_outer (generic function with 2 methods)
Expand All @@ -605,7 +605,7 @@ But one needs to be careful when prefixing variables in the nested models:
```jldoctest fix
julia> @model function demo_outer_prefix()
@submodel prefix="inner" m = demo_inner()
m ~ to_submodel(prefix(demo_inner(), "inner"))
return m
end
demo_outer_prefix (generic function with 2 methods)
Expand Down

0 comments on commit 933e4ed

Please sign in to comment.