Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing begin in @transform example #384

Merged
merged 1 commit into from
Mar 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/src/ref/trace_translators.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ To handle general trace translators that require auxiliary probability distribut
For example, the following defines a trace transform that maps from pairs of traces of `p1` and `q1` to pairs of traces of `p2` and `q2`:

```julia
@transform f (p1_trace, q1_trace) to (p2_trace, q2_trace)
@transform f (p1_trace, q1_trace) to (p2_trace, q2_trace) begin
x = @read(p1_trace[:x], :continuous)
y = @read(p1_trace[:y], :continuous)
i = ceil(x * 10)
Expand All @@ -257,7 +257,7 @@ end
```
and the inverse transform:
```julia
@transform f_inv (p2_trace, q2_trace) to (p1_trace, q1_trace)
@transform f_inv (p2_trace, q2_trace) to (p1_trace, q1_trace) begin
i = @read(p2_trace[:i], :discrete)
j = @read(p2_trace[:j], :discrete)
dx = @read(q2_trace[:dx], :continuous)
Expand Down