From 77bd5707f143eb624721a7df28ddef470e70ecef Mon Sep 17 00:00:00 2001 From: Milan Bouchet-Valat Date: Tue, 4 Feb 2025 22:19:20 +0100 Subject: [PATCH] Fix `quantile` doctest (#188) We should have updated the doctests when improving behavior at #184. Also update Documenter, which by default now fails when doctests fail. --- docs/Project.toml | 2 +- docs/make.jl | 1 + src/Statistics.jl | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/Project.toml b/docs/Project.toml index 1b9ab1f8..43ecaaee 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -2,4 +2,4 @@ Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" [compat] -Documenter = "0.24" +Documenter = "1.8" diff --git a/docs/make.jl b/docs/make.jl index 6e89a00c..0f77c1e2 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -8,6 +8,7 @@ end makedocs( modules = [Statistics], sitename = "Statistics", + warnonly = [:missing_docs, :cross_references], pages = Any[ "Statistics" => "index.md" ] diff --git a/src/Statistics.jl b/src/Statistics.jl index 6434af28..8b21dccb 100644 --- a/src/Statistics.jl +++ b/src/Statistics.jl @@ -962,9 +962,9 @@ true julia> y 3-element Vector{Float64}: - 1.2000000000000002 + 1.2 2.0 - 2.8000000000000003 + 2.8 ``` """ function quantile!(q::AbstractArray, v::AbstractVector, p::AbstractArray; @@ -1106,7 +1106,7 @@ julia> quantile(0:20, [0.1, 0.5, 0.9]) 3-element Vector{Float64}: 2.0 10.0 - 18.000000000000004 + 18.0 julia> quantile(skipmissing([1, 10, missing]), 0.5) 5.5