Skip to content

Commit ba5e3eb

Browse files
committed
Fix parse error with Julia 1.0
1 parent f5bc54b commit ba5e3eb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/context_implementations.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
@model function test(x)
55
μ ~ MvNormal(fill(0, 2), 2.0)
66
z = Vector{Int}(undef, length(x))
7-
z .~ Categorical.(fill([0.5, 0.5], length(x)))
7+
# `z .~ Categorical.(ps)` cannot be parsed by Julia 1.0
8+
(.~)(z, Categorical.(fill([0.5, 0.5], length(x))))
89
for i in 1:length(x)
910
x[i] ~ Normal(μ[z[i]], 0.1)
1011
end

0 commit comments

Comments
 (0)