Skip to content

Commit 6f3cccd

Browse files
committed
Fix DynamicPPL import
1 parent f8d87cb commit 6f3cccd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

usage/probability-interface/index.qmd

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Let's use a simple model of normally-distributed data as an example.
1818

1919
```{julia}
2020
using Turing
21-
using LinearAlgebra: I
21+
using DynamicPPL
2222
using Random
2323
2424
@model function gdemo(n)
@@ -98,11 +98,9 @@ logjoint(model, sample)
9898
```
9999

100100
For models with many variables `rand(model)` can be prohibitively slow since it returns a `NamedTuple` of samples from the prior distribution of the unconditioned variables.
101-
We recommend working with samples of type `DataStructures.OrderedDict` in this case:
101+
We recommend working with samples of type `DataStructures.OrderedDict` in this case (which Turing re-exports, so can be used directly):
102102

103103
```{julia}
104-
using DataStructures: OrderedDict
105-
106104
Random.seed!(124)
107105
sample_dict = rand(OrderedDict, model)
108106
```

0 commit comments

Comments
 (0)