We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b193140 commit 4492504Copy full SHA for 4492504
test/compiler.jl
@@ -312,6 +312,18 @@ end
312
@test vi2.metadata.y.vns[1] == @varname(y[2][:, 1])
313
@test haskey(vi3.metadata, :y)
314
@test vi3.metadata.y.vns[1] == @varname(y[1])
315
+
316
+ # Conditioning
317
+ f1_c = f1() | (y=1,)
318
+ f2_c = f2() | NamedTuple((Symbol(@varname(y[2][:, 1])) => 1,))
319
+ f3_c = f3() | NamedTuple((Symbol(@varname(y[1])) => 1,))
320
+ @test f1_c() == 1
321
+ # TODO(torfjelde): We need conditioning for `Dict`.
322
+ @test_broken f2_c() == 1
323
+ @test_broken f3_c() == 1
324
+ @test_broken getlogp(VarInfo(f1_c)) ==
325
+ getlogp(VarInfo(f2_c)) ==
326
+ getlogp(VarInfo(f3_c))
327
end
328
@testset "custom tilde" begin
329
@model demo() = begin
0 commit comments