@@ -41,7 +41,9 @@ using Turing
41
41
Random. seed! (5 )
42
42
chain2 = sample (model, sampler, MCMCThreads (), 10 , 4 )
43
43
44
- @test chain1. value == chain2. value
44
+ # For HMC, the first step does not have stats, so we need to use isequal to
45
+ # avoid comparing `missing`s
46
+ @test isequal (chain1. value, chain2. value)
45
47
end
46
48
47
49
# Should also be stable with an explicit RNG
@@ -54,7 +56,7 @@ using Turing
54
56
Random. seed! (rng, local_seed)
55
57
chain2 = sample (rng, model, sampler, MCMCThreads (), 10 , 4 )
56
58
57
- @test chain1. value == chain2. value
59
+ @test isequal ( chain1. value, chain2. value)
58
60
end
59
61
end
60
62
@@ -608,8 +610,8 @@ using Turing
608
610
609
611
@testset " names_values" begin
610
612
ks, xs = Turing. Inference. names_values ([(a= 1 ,), (b= 2 ,), (a= 3 , b= 4 )])
611
- @test all (xs[:, 1 ] .=== [1 , missing , 3 ])
612
- @test all (xs[:, 2 ] .=== [missing , 2 , 4 ])
613
+ @test isequal (xs[:, 1 ], [1 , missing , 3 ])
614
+ @test isequal (xs[:, 2 ], [missing , 2 , 4 ])
613
615
end
614
616
615
617
@testset " check model" begin
0 commit comments