File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 11name = " Distributions"
22uuid = " 31c24e10-a181-5473-b8eb-7969acd0382f"
33authors = [" JuliaStats" ]
4- version = " 0.25.112 "
4+ version = " 0.25.113 "
55
66[deps ]
77AliasTables = " 66dad0bd-aa9a-41b7-9441-69ab47430ed8"
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ struct Geometric{T<:Real} <: DiscreteUnivariateDistribution
3030end
3131
3232function Geometric (p:: Real ; check_args:: Bool = true )
33- @check_args Geometric (p, zero (p) < p < one (p))
33+ @check_args Geometric (p, zero (p) < p <= one (p))
3434 return Geometric {typeof(p)} (p)
3535end
3636
Original file line number Diff line number Diff line change @@ -18,3 +18,8 @@ using FiniteDifferences
1818 test_cgf (Geometric (0.1 ), (1f-1 , - 1e6 ))
1919 test_cgf (Geometric (0.5 ), (1f-1 , - 1e6 ))
2020end
21+
22+ @testset " Support" begin
23+ @test rand (Geometric (1 )) == 0
24+ @test_throws DomainError Geometric (0 )
25+ end
You can’t perform that action at this time.
0 commit comments