diff --git a/test/distributions/distributions_setuptests.jl b/test/distributions/distributions_setuptests.jl index ecfdd135..a08d0ffa 100644 --- a/test/distributions/distributions_setuptests.jl +++ b/test/distributions/distributions_setuptests.jl @@ -221,6 +221,7 @@ function run_test_basic_functions(distribution; nsamples = 10, test_gradients = @test @inferred(mean(ef)) ≈ mean(distribution) @test @inferred(var(ef)) ≈ var(distribution) @test @inferred(std(ef)) ≈ std(distribution) + @test size(ExponentialFamily.check_logpdf(variate_form(typeof(ef)), typeof(x), eltype(x), ef, rand(ef, 10))[2])[end] === 10 @test rand(StableRNG(42), ef) ≈ rand(StableRNG(42), distribution) @test all(rand(StableRNG(42), ef, 10) .≈ rand(StableRNG(42), distribution, 10)) @test all(rand!(StableRNG(42), ef, [deepcopy(x) for _ in 1:10]) .≈ rand!(StableRNG(42), distribution, [deepcopy(x) for _ in 1:10]))