diff --git a/docs/make.jl b/docs/make.jl index 78208d5e7..04125d23b 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -1,4 +1,4 @@ -using Documenter, StatsBase +using Documenter, StatsBase, Statistics, Random makedocs( format = :html, diff --git a/docs/src/index.md b/docs/src/index.md index 798f28000..a3cf572a2 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -2,6 +2,10 @@ ```@meta CurrentModule = StatsBase +DocTestSetup = quote + using Statistics + using Random +end ``` *StatsBase.jl* is a Julia package that provides basic support for statistics. Particularly, it implements a variety of statistics-related functions, such as scalar statistics, high-order moment computation, counting, ranking, covariances, sampling, and empirical density estimation. diff --git a/docs/src/means.md b/docs/src/means.md index 1ec802fb2..47b9ff089 100644 --- a/docs/src/means.md +++ b/docs/src/means.md @@ -12,6 +12,6 @@ The `mean` and `mean!` functions are also extended to accept a weight vector of `AbstractWeights` to compute weighted mean. ```@docs -Base.mean(A::AbstractArray, w::AbstractWeights) -Base.mean!(R::AbstractArray, A::AbstractArray, w::AbstractWeights, dim::Int) +Statistics.mean(A::AbstractArray, w::AbstractWeights) +Statistics.mean!(R::AbstractArray, A::AbstractArray, w::AbstractWeights, dim::Int) ``` diff --git a/docs/src/sampling.md b/docs/src/sampling.md index 82c159287..ffe3ffa8b 100644 --- a/docs/src/sampling.md +++ b/docs/src/sampling.md @@ -38,7 +38,7 @@ All following functions write results to `x` (pre-allocated) and return `x`. ### Sampling Algorithms (Non-Weighted) ```@docs -StatsBase.direct_sample!(rng::AbstractRNG, a::AbstractArray, x::AbstractArray) +StatsBase.direct_sample!(rng::Random.AbstractRNG, a::AbstractArray, x::AbstractArray) samplepair StatsBase.knuths_sample! StatsBase.fisher_yates_sample! @@ -50,7 +50,7 @@ StatsBase.seqsample_c! ### Weighted Sampling Algorithms ```@docs -StatsBase.direct_sample!(rng::AbstractRNG, a::AbstractArray, wv::AbstractWeights, x::AbstractArray) +StatsBase.direct_sample!(rng::Random.AbstractRNG, a::AbstractArray, wv::AbstractWeights, x::AbstractArray) StatsBase.alias_sample! StatsBase.naive_wsample_norep! StatsBase.efraimidis_a_wsample_norep! diff --git a/docs/src/scalarstats.md b/docs/src/scalarstats.md index bc17fd83a..1159b274d 100644 --- a/docs/src/scalarstats.md +++ b/docs/src/scalarstats.md @@ -46,7 +46,7 @@ percentile iqr nquantile quantile -Base.median(v::StatsBase.RealVector, w::AbstractWeights{<:Real}) +Statistics.median(v::StatsBase.RealVector, w::AbstractWeights{<:Real}) ``` ## Mode and Modes