Skip to content

Commit b45eef0

Browse files
committed
Update .~ syntax
1 parent d3c6d6e commit b45eef0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

core-functionality/index.qmd

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,10 @@ Example usage:
475475
k = length(unique(g))
476476
a ~ filldist(Exponential(), k) # = Product(fill(Exponential(), k))
477477
mu = a[g]
478-
return x .~ Normal.(mu)
478+
for i in eachindex(x)
479+
x[i] ~ Normal(mu[i])
480+
end
481+
return mu
479482
end
480483
```
481484

@@ -491,7 +494,10 @@ Example usage:
491494
k = length(unique(g))
492495
a ~ arraydist([Exponential(i) for i in 1:k])
493496
mu = a[g]
494-
return x .~ Normal.(mu)
497+
for i in eachindex(x)
498+
x[i] ~ Normal(mu[i])
499+
end
500+
return mu
495501
end
496502
```
497503

0 commit comments

Comments
 (0)