diff --git a/EpiAware/src/EpiAwareUtils/SafePoisson.jl b/EpiAware/src/EpiAwareUtils/SafePoisson.jl index 57a541325..a1aebdeee 100644 --- a/EpiAware/src/EpiAwareUtils/SafePoisson.jl +++ b/EpiAware/src/EpiAwareUtils/SafePoisson.jl @@ -45,7 +45,7 @@ var(d) 7.016735912097631e20 ``` " -struct SafePoisson{T <: Real} <: ContinuousUnivariateDistribution +struct SafePoisson{T <: Real} <: DiscreteUnivariateDistribution λ::T SafePoisson{T}(λ::Real) where {T <: Real} = new{T}(λ) diff --git a/EpiAware/test/EpiAwareUtils/SafePoisson.jl b/EpiAware/test/EpiAwareUtils/SafePoisson.jl index f8fa89cad..6630e066b 100644 --- a/EpiAware/test/EpiAwareUtils/SafePoisson.jl +++ b/EpiAware/test/EpiAwareUtils/SafePoisson.jl @@ -2,6 +2,9 @@ λ = 10.0 dist = SafePoisson(λ) @test typeof(dist) <: SafePoisson + @test rand(dist) isa Int + @test rand(dist, 10) isa Vector{Int} + @test rand(dist, 10, 10) isa Array{Int} end @testitem "Check distribution properties of SafePoisson" begin