From c03ba207b3a810650f9394f93276209a6e9caab3 Mon Sep 17 00:00:00 2001 From: "Navid C. Constantinou" Date: Tue, 6 Jul 2021 16:48:15 +1000 Subject: [PATCH 1/2] Update `LinRange` example to comply with Julia > v1.6 --- base/range.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/range.jl b/base/range.jl index 8845f363cd38c..1b9fe13782a0f 100644 --- a/base/range.jl +++ b/base/range.jl @@ -467,7 +467,7 @@ Compared to using [`range`](@ref), directly constructing a `LinRange` should have less overhead but won't try to correct for floating point errors: ```julia julia> collect(range(-0.1, 0.3, length=5)) -5-element Array{Float64,1}: +5-element Vector{Float64}: -0.1 0.0 0.1 @@ -475,7 +475,7 @@ julia> collect(range(-0.1, 0.3, length=5)) 0.3 julia> collect(LinRange(-0.1, 0.3, 5)) -5-element Array{Float64,1}: +5-element Vector{Float64}: -0.1 -1.3877787807814457e-17 0.09999999999999999 From f67a2f23afc147a29aabaeb16dc607f0322a6c39 Mon Sep 17 00:00:00 2001 From: "Navid C. Constantinou" Date: Tue, 6 Jul 2021 17:00:38 +1000 Subject: [PATCH 2/2] converts example to doctest Co-authored-by: Johnny Chen --- base/range.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/range.jl b/base/range.jl index 1b9fe13782a0f..355ee2d80bce2 100644 --- a/base/range.jl +++ b/base/range.jl @@ -465,7 +465,7 @@ julia> LinRange(1.5, 5.5, 9) Compared to using [`range`](@ref), directly constructing a `LinRange` should have less overhead but won't try to correct for floating point errors: -```julia +```jldoctest julia> collect(range(-0.1, 0.3, length=5)) 5-element Vector{Float64}: -0.1