From bc5469207ec00b742dd8f1ec16fbd980f6f1bba3 Mon Sep 17 00:00:00 2001 From: Will Tebbutt Date: Tue, 20 Sep 2022 15:14:37 +0100 Subject: [PATCH] Fix tests --- test/independent_mogp.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/independent_mogp.jl b/test/independent_mogp.jl index d058d8f..cee5e14 100644 --- a/test/independent_mogp.jl +++ b/test/independent_mogp.jl @@ -53,7 +53,9 @@ @test isapprox( logpdf(post_fx, y_test), logpdf(post_fx1, y_1_test) + logpdf(post_fx2, y_2_test) ) - @test marginals(post_fx) == vcat(marginals(post_fx1), marginals(post_fx2)) + @test all( + isapprox.(marginals(post_fx), vcat(marginals(post_fx1), marginals(post_fx2))) + ) @test isapprox(mean(post_fx), vcat(mean(post_fx1), mean(post_fx2))) @test isapprox(var(post_fx), vcat(var(post_fx1), var(post_fx2))) @test length(rand(rng, post_fx)) == length(f.fs) * length(x_test_mo.x)