Skip to content

Commit

Permalink
Update abstractarray.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
putianyi889 authored Nov 2, 2024
1 parent 466ad24 commit c28f960
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions base/abstractarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1235,13 +1235,7 @@ isempty(a::AbstractArray) = (length(a) == 0)


## range conversions ##

map(::Type{T}, r::StepRange) where {T<:Real} = T(r.start):T(r.step):T(last(r))
map(::Type{T}, r::UnitRange) where {T<:Real} = T(r.start):T(last(r))
map(::Type{T}, r::StepRangeLen) where {T<:AbstractFloat} = convert(StepRangeLen{T}, r)
function map(::Type{T}, r::LinRange) where T<:AbstractFloat
LinRange(T(r.start), T(r.stop), length(r))
end
map(::Type{T}, r::AbstractRange) where {T<:Real} = AbstractArray{T}(r)

## unsafe/pointer conversions ##

Expand Down

0 comments on commit c28f960

Please sign in to comment.