Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions 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.122"
version = "0.25.123"

[deps]
AliasTables = "66dad0bd-aa9a-41b7-9441-69ab47430ed8"
Expand All @@ -13,6 +13,7 @@ PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
QuadGK = "1fd47b50-473d-5c70-9696-f719f8f3bcdc"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Rmath = "79098fc4-a85e-5d69-aa6a-4863f24498fa"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsAPI = "82ae8749-77ed-4fe6-ae5f-f523153014b0"
Expand Down Expand Up @@ -48,14 +49,15 @@ PDMats = "0.11.35"
Printf = "<0.0.1, 1"
QuadGK = "2"
Random = "<0.0.1, 1"
Rmath = "0.9"
SparseArrays = "<0.0.1, 1"
SpecialFunctions = "1.2, 2"
StableRNGs = "1"
StaticArrays = "1"
Statistics = "1"
StatsAPI = "1.6"
StatsBase = "0.32, 0.33, 0.34"
StatsFuns = "0.9.15, 1"
StatsFuns = "1.5.2"
Test = "<0.0.1, 1"
julia = "1.10"

Expand Down
1 change: 1 addition & 0 deletions src/Distributions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ using SpecialFunctions
using Base.MathConstants: eulergamma

import AliasTables
import Rmath

export
# re-export Statistics
Expand Down
2 changes: 1 addition & 1 deletion src/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ Get the probability of failure.
"""
failprob(d::DiscreteUnivariateDistribution)

# Temporary fix to handle RFunctions dependencies
# Temporary fix to handle Rmath dependencies
"""
@rand_rdist(::Distribution)

Expand Down
2 changes: 1 addition & 1 deletion src/univariate/continuous/noncentralbeta.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ partype(::NoncentralBeta{T}) where {T} = T

@_delegate_statsfuns NoncentralBeta nbeta α β λ

# TODO: remove RFunctions dependency once NoncentralChisq has its removed
# TODO: remove Rmath dependency once NoncentralChisq has its removed
@rand_rdist(NoncentralBeta)

function rand(d::NoncentralBeta)
Expand Down
4 changes: 2 additions & 2 deletions src/univariate/continuous/noncentralchisq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ end

@_delegate_statsfuns NoncentralChisq nchisq ν λ

# TODO: remove RFunctions dependency
# TODO: remove Rmath dependency
@rand_rdist(NoncentralChisq)
rand(d::NoncentralChisq) = StatsFuns.RFunctions.nchisqrand(d.ν, d.λ)
rand(d::NoncentralChisq) = Rmath.rnchisq(d.ν, d.λ)
2 changes: 1 addition & 1 deletion src/univariate/continuous/noncentralf.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function rand(rng::AbstractRNG, d::NoncentralF)
r1 / r2
end

# TODO: remove RFunctions dependency once NoncentralChisq has its removed
# TODO: remove Rmath dependency once NoncentralChisq has its removed
@rand_rdist(NoncentralF)
function rand(d::NoncentralF)
r1 = rand(NoncentralChisq(d.ν1,d.λ)) / d.ν1
Expand Down
5 changes: 2 additions & 3 deletions src/univariate/discrete/hypergeometric.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,10 @@ entropy(d::Hypergeometric) = entropy(map(Base.Fix1(pdf, d), support(d)))

## sampling

# TODO: remove RFunctions dependency. Implement:
# TODO: remove Rmath dependency. Implement:
# V. Kachitvichyanukul & B. Schmeiser
# "Computer generation of hypergeometric random variates"
# Journal of Statistical Computation and Simulation, 22(2):127-145
# doi:10.1080/00949658508810839
@rand_rdist(Hypergeometric)
rand(d::Hypergeometric) =
convert(Int, StatsFuns.RFunctions.hyperrand(d.ns, d.nf, d.n))
rand(d::Hypergeometric) = convert(Int, Rmath.rhyper(d.ns, d.nf, d.n))
Loading