From 7d7dd1c022725ae1d58a1101e46d1127fe00fe15 Mon Sep 17 00:00:00 2001 From: ffreyer Date: Mon, 29 Jul 2024 14:15:34 +0200 Subject: [PATCH] fix remaining converts --- src/conversions.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/conversions.jl b/src/conversions.jl index 5211078d95f..feb4c3a4e71 100644 --- a/src/conversions.jl +++ b/src/conversions.jl @@ -361,7 +361,7 @@ end to_interval(x::Tuple{<: Real, <: Real}) = float_convert(x[1]) .. float_convert(x[2]) to_interval(x::Interval) = float_convert(leftendpoint(x)) .. float_convert(rightendpoint(x)) function to_interval(x::Union{AbstractVector}) - return float_convert(minimum(x)) .. float_convert(maximum(x)) + return float_convert(first(x)) .. float_convert(last(x)) end @@ -649,7 +649,8 @@ end # Helper Functions # ################################################################################ -to_linspace(interval, N) = range(minimum(interval), stop = maximum(interval), length = N) +to_linspace(interval::Interval, N) = range(leftendpoint(interval), stop = rightendpoint(interval), length = N) +to_linspace(x, N) = range(first(x), stop = last(x), length = N) """ Converts the element array type to `T1` without making a copy if the element type matches