From c8669337047b82114ef274f7af16efeaf58dab51 Mon Sep 17 00:00:00 2001 From: Abhro R <5664668+abhro@users.noreply.github.com> Date: Sat, 15 Mar 2025 00:32:15 -0400 Subject: [PATCH 01/12] Use sources path attribute for docs/Project.toml --- docs/Project.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/Project.toml b/docs/Project.toml index 52b12d674..24cf6c0a2 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -5,3 +5,6 @@ StatsAPI = "82ae8749-77ed-4fe6-ae5f-f523153014b0" [compat] Documenter = "1" + +[sources.StatsBase] +path = ".." From 8af48d6601a55c84626be1c1ee9ef347a8b0253e Mon Sep 17 00:00:00 2001 From: Abhro R <5664668+abhro@users.noreply.github.com> Date: Sat, 15 Mar 2025 00:33:31 -0400 Subject: [PATCH 02/12] Fix markdown lists in docstrings --- src/scalarstats.jl | 28 ++++++++++++++-------------- src/transformations.jl | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/scalarstats.jl b/src/scalarstats.jl index 2936f9276..acfbb5cc0 100644 --- a/src/scalarstats.jl +++ b/src/scalarstats.jl @@ -240,30 +240,30 @@ Let `count_less` be the number of elements of `itr` that are less than `value`, Then `method` supports the following definitions: - `:inc` (default): Return a value in the range 0 to 1 inclusive. -Return `count_less / (n - 1)` if `value ∈ itr`, otherwise apply interpolation based on -definition 7 of quantile in Hyndman and Fan (1996) -(equivalent to Excel `PERCENTRANK` and `PERCENTRANK.INC`). -This definition corresponds to the lower semi-continuous inverse of -[`quantile`](@ref) with its default parameters. + Return `count_less / (n - 1)` if `value ∈ itr`, otherwise apply interpolation based on + definition 7 of quantile in Hyndman and Fan (1996) + (equivalent to Excel `PERCENTRANK` and `PERCENTRANK.INC`). + This definition corresponds to the lower semi-continuous inverse of + [`quantile`](@ref) with its default parameters. - `:exc`: Return a value in the range 0 to 1 exclusive. -Return `(count_less + 1) / (n + 1)` if `value ∈ itr` otherwise apply interpolation -based on definition 6 of quantile in Hyndman and Fan (1996) -(equivalent to Excel `PERCENTRANK.EXC`). + Return `(count_less + 1) / (n + 1)` if `value ∈ itr` otherwise apply interpolation + based on definition 6 of quantile in Hyndman and Fan (1996) + (equivalent to Excel `PERCENTRANK.EXC`). - `:compete`: Return `count_less / (n - 1)` if `value ∈ itr`, otherwise -return `(count_less - 1) / (n - 1)`, without interpolation -(equivalent to MariaDB `PERCENT_RANK`, dplyr `percent_rank`). + return `(count_less - 1) / (n - 1)`, without interpolation + (equivalent to MariaDB `PERCENT_RANK`, dplyr `percent_rank`). - `:tied`: Return `(count_less + count_equal/2) / n`, without interpolation. -Based on the definition in Roscoe, J. T. (1975) -(equivalent to `"mean"` kind of SciPy `percentileofscore`). + Based on the definition in Roscoe, J. T. (1975) + (equivalent to `"mean"` kind of SciPy `percentileofscore`). - `:strict`: Return `count_less / n`, without interpolation -(equivalent to `"strict"` kind of SciPy `percentileofscore`). + (equivalent to `"strict"` kind of SciPy `percentileofscore`). - `:weak`: Return `(count_less + count_equal) / n`, without interpolation -(equivalent to `"weak"` kind of SciPy `percentileofscore`). + (equivalent to `"weak"` kind of SciPy `percentileofscore`). !!! note An `ArgumentError` is thrown if `itr` contains `NaN` or `missing` values diff --git a/src/transformations.jl b/src/transformations.jl index a4214b5db..d9003bee2 100644 --- a/src/transformations.jl +++ b/src/transformations.jl @@ -237,7 +237,7 @@ and return a `UnitRangeTransform` transformation object. # Keyword arguments * `dims`: if `1` fit standardization parameters in column-wise fashion; - if `2` fit in row-wise fashion. The default is `nothing`. + if `2` fit in row-wise fashion. The default is `nothing`. * `unit`: if `true` (the default) shift the minimum data to zero. From 879688528fa43a17bdb39bfb15467b22bc78ff6e Mon Sep 17 00:00:00 2001 From: Abhro R <5664668+abhro@users.noreply.github.com> Date: Sat, 15 Mar 2025 00:35:32 -0400 Subject: [PATCH 03/12] Add doctests --- docs/make.jl | 2 ++ docs/src/weights.md | 15 ++++++++++----- src/hist.jl | 6 +++--- src/robust.jl | 8 ++++---- src/weights.jl | 4 ++-- 5 files changed, 21 insertions(+), 14 deletions(-) diff --git a/docs/make.jl b/docs/make.jl index 669df4d83..e3c2e2188 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -5,6 +5,8 @@ if Base.HOME_PROJECT[] !== nothing Base.HOME_PROJECT[] = abspath(Base.HOME_PROJECT[]) end +DocMeta.setdocmeta!(StatsBase, :DocTestSetup, :(using StatsBase)) + makedocs( sitename = "StatsBase.jl", modules = [StatsBase, StatsAPI], diff --git a/docs/src/weights.md b/docs/src/weights.md index 7c38d4fb9..ace8a02b7 100644 --- a/docs/src/weights.md +++ b/docs/src/weights.md @@ -1,3 +1,8 @@ +```@meta +DocTestSetup = quote + using StatsBase +end +``` # Weight Vectors In statistical applications, it is not uncommon to assign weights to samples. To facilitate the use of weight vectors, we introduce the abstract type `AbstractWeights` for the purpose of representing weight vectors, which has two advantages: @@ -75,9 +80,9 @@ As this value approaches 0, the resulting weights will be almost equal, while values closer to 1 will put greater weight on the tail elements of the vector. For example, the following call generates exponential weights for ten observations with ``λ = 0.3``. -```julia-repl +```jldoctest julia> eweights(1:10, 0.3) -10-element Weights{Float64,Float64,Array{Float64,1}}: +10-element Weights{Float64, Float64, Vector{Float64}}: 0.3 0.42857142857142855 0.6122448979591837 @@ -92,9 +97,9 @@ julia> eweights(1:10, 0.3) Simply passing the number of observations `n` is equivalent to passing in `1:n`. -```julia-repl +```jldoctest julia> eweights(10, 0.3) -10-element Weights{Float64,Float64,Array{Float64,1}}: +10-element Weights{Float64, Float64, Vector{Float64}}: 0.3 0.42857142857142855 0.6122448979591837 @@ -117,7 +122,7 @@ julia> r 2019-01-01T01:00:00:1 hour:2019-01-02T01:00:00 julia> eweights(t, r, 0.3) -3-element Weights{Float64,Float64,Array{Float64,1}}: +3-element Weights{Float64, Float64, Vector{Float64}}: 0.3 0.6122448979591837 1.249479383590171 diff --git a/src/hist.jl b/src/hist.jl index 7333d8424..23d6fc6d1 100644 --- a/src/hist.jl +++ b/src/hist.jl @@ -155,7 +155,7 @@ closed: right isdensity: false ``` ## Example illustrating `isdensity` -```julia +```jldoctest julia> using StatsBase, LinearAlgebra julia> bins = [0,1,7]; # a small and a large bin @@ -163,7 +163,7 @@ julia> bins = [0,1,7]; # a small and a large bin julia> obs = [0.5, 1.5, 1.5, 2.5]; # one observation in the small bin and three in the large julia> h = fit(Histogram, obs, bins) -Histogram{Int64,1,Tuple{Array{Int64,1}}} +Histogram{Int64, 1, Tuple{Vector{Int64}}} edges: [0, 1, 7] weights: [1, 3] @@ -173,7 +173,7 @@ isdensity: false julia> # observe isdensity = false and the weights field records the number of observations in each bin julia> normalize(h, mode=:density) -Histogram{Float64,1,Tuple{Array{Int64,1}}} +Histogram{Float64, 1, Tuple{Vector{Int64}}} edges: [0, 1, 7] weights: [1.0, 0.5] diff --git a/src/robust.jl b/src/robust.jl index cfe114ead..f21595395 100644 --- a/src/robust.jl +++ b/src/robust.jl @@ -41,9 +41,9 @@ To compute the trimmed mean of `x` use `mean(trim(x))`; to compute the variance use `trimvar(x)` (see [`trimvar`](@ref)). # Example -```julia +```jldoctest julia> collect(trim([5,2,4,3,1], prop=0.2)) -3-element Array{Int64,1}: +3-element Vector{Int64}: 2 4 3 @@ -80,9 +80,9 @@ elements equal the lower or upper bound. To compute the Winsorized mean of `x` use `mean(winsor(x))`. # Example -```julia +```jldoctest julia> collect(winsor([5,2,3,4,1], prop=0.2)) -5-element Array{Int64,1}: +5-element Vector{Int64}: 4 2 3 diff --git a/src/weights.jl b/src/weights.jl index 9bf5c5336..d81730b09 100644 --- a/src/weights.jl +++ b/src/weights.jl @@ -250,9 +250,9 @@ If `scale` is `false` then each value is computed as: - `scale::Bool`: Return the weights scaled to between 0 and 1 (default: false) # Examples -```julia-repl +```jldoctest julia> eweights(1:10, 0.3; scale=true) -10-element Weights{Float64,Float64,Array{Float64,1}}: +10-element Weights{Float64, Float64, Vector{Float64}}: 0.04035360699999998 0.05764800999999997 0.08235429999999996 From 94c9a33a94a57da503616c789e88255e0bcbda35 Mon Sep 17 00:00:00 2001 From: Abhro R <5664668+abhro@users.noreply.github.com> Date: Sat, 15 Mar 2025 00:35:59 -0400 Subject: [PATCH 04/12] Change to markdown admoniton block --- docs/src/weights.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/src/weights.md b/docs/src/weights.md index ace8a02b7..c26e7817b 100644 --- a/docs/src/weights.md +++ b/docs/src/weights.md @@ -128,8 +128,9 @@ julia> eweights(t, r, 0.3) 1.249479383590171 ``` -NOTE: This is equivalent to `eweights(something.(indexin(t, r)), 0.3)`, which is saying that for each value in `t` return the corresponding index for that value in `r`. -Since `indexin` returns `nothing` if there is no corresponding value from `t` in `r` we use `something` to eliminate that possibility. +!!! note + This is equivalent to `eweights(something.(indexin(t, r)), 0.3)`, which is saying that for each value in `t` return the corresponding index for that value in `r`. + Since `indexin` returns `nothing` if there is no corresponding value from `t` in `r` we use `something` to eliminate that possibility. ## Methods From 970d312492d5ac149b293af1f392d704bea07627 Mon Sep 17 00:00:00 2001 From: Abhro R <5664668+abhro@users.noreply.github.com> Date: Sat, 15 Mar 2025 00:36:10 -0400 Subject: [PATCH 05/12] Change preformat list to markdown list --- docs/src/weights.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/docs/src/weights.md b/docs/src/weights.md index c26e7817b..7fb99b48b 100644 --- a/docs/src/weights.md +++ b/docs/src/weights.md @@ -135,13 +135,11 @@ julia> eweights(t, r, 0.3) ## Methods `AbstractWeights` implements the following methods: -``` -eltype -length -isempty -values -sum -``` +- `eltype` +- `length` +- `isempty` +- `values` +- `sum` The following constructors are provided: ```@docs From e0fe2c535fd8bd90457d0d03d6eb22304db9fe8e Mon Sep 17 00:00:00 2001 From: Abhro R <5664668+abhro@users.noreply.github.com> Date: Sat, 15 Mar 2025 00:37:04 -0400 Subject: [PATCH 06/12] Add syntax highlight tags --- docs/src/index.md | 2 +- src/sampling.jl | 2 +- src/scalarstats.jl | 2 +- src/weights.jl | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index 627201d40..dd1d088ba 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -19,7 +19,7 @@ Pkg.add("StatsBase") ``` To load the package, use the command: -``` +```julia using StatsBase ``` diff --git a/src/sampling.jl b/src/sampling.jl index a80693dcf..b47345b89 100644 --- a/src/sampling.jl +++ b/src/sampling.jl @@ -188,7 +188,7 @@ knuths_sample!(a::AbstractArray, x::AbstractArray; initshuffle::Bool=true) = Fisher-Yates shuffling (with early termination). Pseudo-code: -``` +```julia n = length(a) k = length(x) diff --git a/src/scalarstats.jl b/src/scalarstats.jl index acfbb5cc0..4c509c411 100644 --- a/src/scalarstats.jl +++ b/src/scalarstats.jl @@ -279,7 +279,7 @@ Hyndman, R.J and Fan, Y. (1996) "[Sample Quantiles in Statistical Packages] *The American Statistician*, Vol. 50, No. 4, pp. 361-365. # Examples -```julia +```julia-repl julia> using StatsBase julia> v1 = [1, 1, 1, 2, 3, 4, 8, 11, 12, 13]; diff --git a/src/weights.jl b/src/weights.jl index d81730b09..ea5641aec 100644 --- a/src/weights.jl +++ b/src/weights.jl @@ -594,6 +594,7 @@ wsumtype(::Type{T}, ::Type{T}) where {T<:BlasReal} = T wsum!(R::AbstractArray, A::AbstractArray, w::AbstractVector, dim::Int; init::Bool=true) + Compute the weighted sum of `A` with weights `w` over the dimension `dim` and store the result in `R`. If `init=false`, the sum is added to `R` rather than starting from zero. From bfadab7cc7721151003789f4c68fc5edffcd36be Mon Sep 17 00:00:00 2001 From: Abhro R <5664668+abhro@users.noreply.github.com> Date: Sat, 15 Mar 2025 00:37:34 -0400 Subject: [PATCH 07/12] Center block level latex math --- docs/src/weights.md | 4 +++- src/weights.jl | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/src/weights.md b/docs/src/weights.md index 7fb99b48b..d061288d8 100644 --- a/docs/src/weights.md +++ b/docs/src/weights.md @@ -73,7 +73,9 @@ weights to past observations. If `t` is a vector of temporal indices then for each index `i` we compute the weight as: -``λ (1 - λ)^{1 - i}`` +```math +λ (1 - λ)^{1 - i} +``` ``λ`` is a smoothing factor or rate parameter such that ``0 < λ ≤ 1``. As this value approaches 0, the resulting weights will be almost equal, diff --git a/src/weights.jl b/src/weights.jl index ea5641aec..d8bb20ccf 100644 --- a/src/weights.jl +++ b/src/weights.jl @@ -230,11 +230,15 @@ If `n` is explicitly passed instead of `t`, `t` defaults to `1:n`. If `scale` is `true` then for each element `i` in `t` the weight value is computed as: -``(1 - λ)^{n - i}`` +```math +(1 - λ)^{n - i} +``` If `scale` is `false` then each value is computed as: -``λ (1 - λ)^{1 - i}`` +```math +λ (1 - λ)^{1 - i} +``` # Arguments From 4a80024347e72467c7a66e19f50e5b0af6c098a4 Mon Sep 17 00:00:00 2001 From: Abhro R <5664668+abhro@users.noreply.github.com> Date: Sat, 15 Mar 2025 00:37:52 -0400 Subject: [PATCH 08/12] Use markdown URL link syntax --- src/weights.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/weights.jl b/src/weights.jl index d8bb20ccf..d46f6dd3d 100644 --- a/src/weights.jl +++ b/src/weights.jl @@ -269,8 +269,8 @@ julia> eweights(1:10, 0.3; scale=true) 1.0 ``` # Links -- https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average -- https://en.wikipedia.org/wiki/Exponential_smoothing +- +- """ function eweights(t::AbstractArray{<:Integer}, λ::Real; kwargs...) isempty(t) && return Weights(copy(t), 0) From 58815b83f316da221b78a5dacb6799ffc81a16f1 Mon Sep 17 00:00:00 2001 From: Abhro R <5664668+abhro@users.noreply.github.com> Date: Sat, 15 Mar 2025 00:39:02 -0400 Subject: [PATCH 09/12] Use unicode characters in tex sections They're supported by KaTeX for web rendering, and the characters take up less space when viewing the docstring on REPL or so --- src/deviation.jl | 2 +- src/reliability.jl | 6 +++--- src/weights.jl | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/deviation.jl b/src/deviation.jl index c0e4756eb..c24b26f6f 100644 --- a/src/deviation.jl +++ b/src/deviation.jl @@ -90,7 +90,7 @@ end Linfdist(a, b) Compute the L∞ distance, also called the Chebyshev distance, between -two arrays: ``\\max_{i\\in1:n} |a_i - b_i|``. +two arrays: ``\\max_{1≤i≤n} |a_i - b_i|``. Efficient equivalent of `maxabs(a - b)`. """ function Linfdist(a::AbstractArray{T}, b::AbstractArray{T}) where T<:Number diff --git a/src/reliability.jl b/src/reliability.jl index e9abb58b3..c96ec495a 100644 --- a/src/reliability.jl +++ b/src/reliability.jl @@ -19,11 +19,11 @@ Calculate Cronbach's alpha (1951) from a covariance matrix `covmatrix` according the [formula](https://en.wikipedia.org/wiki/Cronbach%27s_alpha): ```math -\\rho = \\frac{k}{k-1} (1 - \\frac{\\sum^k_{i=1} \\sigma^2_i}{\\sum_{i=1}^k \\sum_{j=1}^k \\sigma_{ij}}) +ρ = \\frac{k}{k-1} \\left(1 - \\frac{\\sum^k_{i=1} σ^2_i}{\\sum_{i=1}^k \\sum_{j=1}^k σ_{ij}}\\right) ``` -where ``k`` is the number of items, i.e. columns, ``\\sigma_i^2`` the item variance, -and ``\\sigma_{ij}`` the inter-item covariance. +where ``k`` is the number of items, i.e. columns, ``σ_i^2`` the item variance, +and ``σ_{ij}`` the inter-item covariance. Returns a `CronbachAlpha` object that holds: diff --git a/src/weights.jl b/src/weights.jl index d46f6dd3d..a15bc9f5d 100644 --- a/src/weights.jl +++ b/src/weights.jl @@ -710,11 +710,11 @@ With [`FrequencyWeights`](@ref), the function returns the same result as `quantile` for a vector with repeated values. Weights must be integers. With non `FrequencyWeights`, denote ``N`` the length of the vector, ``w`` the vector of weights, -``h = p (\\sum_{i \\leq N} w_i - w_1) + w_1`` the cumulative weight corresponding to the +``h = p (\\sum_{i ≤ N} w_i - w_1) + w_1`` the cumulative weight corresponding to the probability ``p`` and ``S_k = \\sum_{i \\leq k} w_i`` the cumulative weight for each observation, define ``v_{k+1}`` the smallest element of `v` such that ``S_{k+1}`` -is strictly superior to ``h``. The weighted ``p`` quantile is given by ``v_k + \\gamma (v_{k+1} - v_k)`` -with ``\\gamma = (h - S_k)/(S_{k+1} - S_k)``. In particular, when all weights are equal, +is strictly superior to ``h``. The weighted ``p`` quantile is given by ``v_k + γ (v_{k+1} - v_k)`` +with ``γ = (h - S_k)/(S_{k+1} - S_k)``. In particular, when all weights are equal, the function returns the same result as the unweighted `quantile`. """ function quantile(v::AbstractVector{<:Real}{V}, w::AbstractWeights{W}, p::AbstractVector{<:Real}) where {V,W<:Real} From 6ff709c06cfb80f394cc9e3d72411932b2db6d7d Mon Sep 17 00:00:00 2001 From: Abhro R <5664668+abhro@users.noreply.github.com> Date: Sat, 15 Mar 2025 00:39:23 -0400 Subject: [PATCH 10/12] Fix up spacing in docstrings --- src/cov.jl | 9 ++++----- src/hist.jl | 3 ++- src/transformations.jl | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/cov.jl b/src/cov.jl index a8b3cbcb8..af1895494 100644 --- a/src/cov.jl +++ b/src/cov.jl @@ -188,7 +188,8 @@ cov(ce::CovarianceEstimator, x::AbstractVector, y::AbstractVector) = error("cov is not defined for $(typeof(ce)), $(typeof(x)) and $(typeof(y))") """ - cov(ce::CovarianceEstimator, X::AbstractMatrix, [w::AbstractWeights]; mean=nothing, dims::Int=1) + cov(ce::CovarianceEstimator, X::AbstractMatrix, [w::AbstractWeights]; + mean=nothing, dims::Int=1) Compute the covariance matrix of the matrix `X` along dimension `dims` using estimator `ce`. A weighting vector `w` can be specified. @@ -238,10 +239,8 @@ function cor(ce::CovarianceEstimator, x::AbstractVector, y::AbstractVector) end """ - cor( - ce::CovarianceEstimator, X::AbstractMatrix, [w::AbstractWeights]; - mean=nothing, dims::Int=1 - ) + cor(ce::CovarianceEstimator, X::AbstractMatrix, [w::AbstractWeights]; + mean=nothing, dims::Int=1) Compute the correlation matrix of the matrix `X` along dimension `dims` using estimator `ce`. A weighting vector `w` can be specified. diff --git a/src/hist.jl b/src/hist.jl index 23d6fc6d1..a464222ed 100644 --- a/src/hist.jl +++ b/src/hist.jl @@ -459,7 +459,8 @@ float(h::Histogram{T,N}) where {T,N} = Histogram(h.edges, float(h.weights), h.cl """ - normalize!(h::Histogram{T,N}, aux_weights::Array{T,N}...; mode::Symbol=:pdf) where {T<:AbstractFloat,N} + normalize!(h::Histogram{T,N}, aux_weights::Array{T,N}...; + mode::Symbol=:pdf) where {T<:AbstractFloat,N} Normalize the histogram `h` and optionally scale one or more auxiliary weight arrays appropriately. See description of `normalize` for details. Returns `h`. diff --git a/src/transformations.jl b/src/transformations.jl index d9003bee2..79c161e26 100644 --- a/src/transformations.jl +++ b/src/transformations.jl @@ -341,8 +341,8 @@ end """ standardize(DT, X; dims=nothing, kwargs...) - Return a standardized copy of vector or matrix `X` along dimensions `dims` - using transformation `DT` which is a subtype of `AbstractDataTransform`: +Return a standardized copy of vector or matrix `X` along dimensions `dims` +using transformation `DT` which is a subtype of `AbstractDataTransform`: - `ZScoreTransform` - `UnitRangeTransform` From d7e76cd64fde3555ada68a7fb65a0ec0f3539021 Mon Sep 17 00:00:00 2001 From: Abhro R <5664668+abhro@users.noreply.github.com> Date: Sat, 15 Mar 2025 00:39:36 -0400 Subject: [PATCH 11/12] Add type header to docstrings --- src/transformations.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/transformations.jl b/src/transformations.jl index 79c161e26..284b72d00 100644 --- a/src/transformations.jl +++ b/src/transformations.jl @@ -47,6 +47,8 @@ reconstruct(t::AbstractDataTransform, y::AbstractVector{<:Real}) = vec(reconstruct(t, reshape(y, :, 1))) """ + ZScoreTransform <: AbstractDataTransform + Standardization (Z-score transformation) """ struct ZScoreTransform{T<:Real, U<:AbstractVector{T}} <: AbstractDataTransform @@ -201,6 +203,8 @@ function reconstruct!(x::AbstractMatrix{<:Real}, t::ZScoreTransform, y::Abstract end """ + UnitRangeTransform <: AbstractDataTransform + Unit range normalization """ struct UnitRangeTransform{T<:Real, U<:AbstractVector} <: AbstractDataTransform From 3a0dfe91cbd843ab014932565be491dae022bba1 Mon Sep 17 00:00:00 2001 From: abhro <5664668+abhro@users.noreply.github.com> Date: Wed, 2 Apr 2025 15:57:10 -0400 Subject: [PATCH 12/12] Fix doctests in weights.md --- docs/src/weights.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/weights.md b/docs/src/weights.md index d061288d8..e9803ca5c 100644 --- a/docs/src/weights.md +++ b/docs/src/weights.md @@ -91,7 +91,7 @@ julia> eweights(1:10, 0.3) 0.8746355685131197 1.249479383590171 1.7849705479859588 - 2.549957925694227 + 2.5499579256942266 3.642797036706039 5.203995766722913 7.434279666747019 @@ -108,7 +108,7 @@ julia> eweights(10, 0.3) 0.8746355685131197 1.249479383590171 1.7849705479859588 - 2.549957925694227 + 2.5499579256942266 3.642797036706039 5.203995766722913 7.434279666747019