Skip to content

Commit

Permalink
Merge branch 'master' into dw/rand_multiple_consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
devmotion authored Dec 10, 2024
2 parents a04559d + 3de6038 commit bbf5468
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
Pkg.instantiate()'
- run: julia --project=perf perf/samplers.jl
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
- uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }} # required
fail_ci_if_error: true
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Distributions"
uuid = "31c24e10-a181-5473-b8eb-7969acd0382f"
authors = ["JuliaStats"]
version = "0.25.112"
version = "0.25.113"

[deps]
AliasTables = "66dad0bd-aa9a-41b7-9441-69ab47430ed8"
Expand Down
2 changes: 1 addition & 1 deletion src/univariate/discrete/geometric.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ struct Geometric{T<:Real} <: DiscreteUnivariateDistribution
end

function Geometric(p::Real; check_args::Bool=true)
@check_args Geometric (p, zero(p) < p < one(p))
@check_args Geometric (p, zero(p) < p <= one(p))
return Geometric{typeof(p)}(p)
end

Expand Down
5 changes: 5 additions & 0 deletions test/univariate/discrete/geometric.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,8 @@ using FiniteDifferences
test_cgf(Geometric(0.1), (1f-1, -1e6))
test_cgf(Geometric(0.5), (1f-1, -1e6))
end

@testset "Support" begin
@test rand(Geometric(1)) == 0
@test_throws DomainError Geometric(0)
end

0 comments on commit bbf5468

Please sign in to comment.