Skip to content

Commit

Permalink
no_offset_view in _maybewrapoffset
Browse files Browse the repository at this point in the history
  • Loading branch information
jishnub committed Feb 27, 2021
1 parent 5a366e7 commit 08c17f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ end
_maybewrapaxes(A::AbstractVector, ::Base.OneTo) = no_offset_view(A)
_maybewrapaxes(A::AbstractVector, ax) = OffsetArray(A, ax)

_maybewrapoffset(r::AbstractUnitRange, of, ::Base.OneTo) = UnitRange(r)
_maybewrapoffset(r::AbstractUnitRange, of, ::Base.OneTo) = no_offset_view(r)
_maybewrapoffset(r::AbstractVector, of, ::Base.OneTo) = no_offset_view(r)
_maybewrapoffset(r::AbstractUnitRange, of, ::Any) = IdOffsetRange(UnitRange(r), of)
_maybewrapoffset(r::AbstractVector, of, axs) = OffsetArray(r .+ of, axs)

0 comments on commit 08c17f3

Please sign in to comment.