Skip to content

Commit efce447

Browse files
authored
Replace truncated(d, 0, Inf) -> truncated(d; lower=0) (#549)
1 parent 1c21a52 commit efce447

File tree

1 file changed

+3
-3
lines changed
  • tutorials/docs-13-using-turing-performance-tips

1 file changed

+3
-3
lines changed

tutorials/docs-13-using-turing-performance-tips/index.qmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ The following example with abstract types
8181
p, n = size(x)
8282
params = Vector{Real}(undef, n)
8383
for i in 1:n
84-
params[i] ~ truncated(Normal(), 0, Inf)
84+
params[i] ~ truncated(Normal(); lower=0)
8585
end
8686
8787
a = x * params
@@ -96,7 +96,7 @@ can be transformed into the following representation with concrete types:
9696
p, n = size(x)
9797
params = Vector{T}(undef, n)
9898
for i in 1:n
99-
params[i] ~ truncated(Normal(), 0, Inf)
99+
params[i] ~ truncated(Normal(); lower=0)
100100
end
101101
102102
a = x * params
@@ -108,7 +108,7 @@ Alternatively, you could use `filldist` in this example:
108108

109109
```{julia}
110110
@model function tmodel(x, y)
111-
params ~ filldist(truncated(Normal(), 0, Inf), size(x, 2))
111+
params ~ filldist(truncated(Normal(); lower=0), size(x, 2))
112112
a = x * params
113113
return y ~ MvNormal(a, I)
114114
end

0 commit comments

Comments
 (0)