Skip to content

Commit

Permalink
fix remaining converts
Browse files Browse the repository at this point in the history
  • Loading branch information
ffreyer committed Jul 29, 2024
1 parent 3321bb5 commit 7d7dd1c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/conversions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7d7dd1c

Please sign in to comment.