@@ -242,16 +242,16 @@ to_index(x::LinearIndices, i::AbstractArray{Bool}) = LogicalIndex{Int}(i)
242
242
@inline to_index (x, i:: NDIndex ) = Tuple (i)
243
243
@inline to_index (x, i:: AbstractArray{<:AbstractCartesianIndex} ) = i
244
244
@inline function to_index (x, i:: Base.Fix2{<:Union{typeof(<),typeof(isless)},<:Union{Base.BitInteger,StaticInt}} )
245
- offset1 (x): min (_sub1 (canonicalize (i. x)), static_lastindex (x))
245
+ static_first (x): min (_sub1 (canonicalize (i. x)), static_last (x))
246
246
end
247
247
@inline function to_index (x, i:: Base.Fix2{typeof(<=),<:Union{Base.BitInteger,StaticInt}} )
248
- offset1 (x): min (canonicalize (i. x), static_lastindex (x))
248
+ static_first (x): min (canonicalize (i. x), static_last (x))
249
249
end
250
250
@inline function to_index (x, i:: Base.Fix2{typeof(>=),<:Union{Base.BitInteger,StaticInt}} )
251
- max (canonicalize (i. x), offset1 (x)): static_lastindex (x)
251
+ max (canonicalize (i. x), static_first (x)): static_last (x)
252
252
end
253
253
@inline function to_index (x, i:: Base.Fix2{typeof(>),<:Union{Base.BitInteger,StaticInt}} )
254
- max (_add1 (canonicalize (i. x)), offset1 (x)): static_lastindex (x)
254
+ max (_add1 (canonicalize (i. x)), static_first (x)): static_last (x)
255
255
end
256
256
# integer indexing
257
257
to_index (x, i:: AbstractArray{<:Integer} ) = i
0 commit comments