Skip to content

Commit

Permalink
fix range on v1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jishnub committed Apr 29, 2021
1 parent 80049e5 commit bd0c993
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 @@ -88,7 +88,7 @@ end
# However these ensure that the result is an AbstractRange even if a specific
# broadcasting behavior is not defined for a custom type
_subtractoffset(r::AbstractUnitRange, of) = UnitRange(first(r) - of, last(r) - of)
_subtractoffset(r::AbstractRange, of) = range(first(r) - of, last(r) - of, step = step(r))
_subtractoffset(r::AbstractRange, of) = range(first(r) - of, stop = last(r) - of, step = step(r))

if VERSION <= v"1.7.0-DEV.1039"
_contiguousindexingtype(r::AbstractUnitRange{<:Integer}) = UnitRange{Int}(r)
Expand Down

0 comments on commit bd0c993

Please sign in to comment.