Skip to content

Commit 8aabc15

Browse files
authored
Merge pull request #31 from JuliaArrays/jishnub/reqindexing
Use require_one_based_indexing from Base
2 parents 8ce7b62 + 31765bd commit 8aabc15

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/StaticArraysCore.jl

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,6 @@ const MMatrix{S1, S2, T, L} = MArray{Tuple{S1, S2}, T, 2, L}
246246

247247
# SizedArray
248248

249-
require_one_based_indexing(A...) = !Base.has_offset_axes(A...) ||
250-
throw(ArgumentError("offset arrays are not supported but got an array with index other than 1"))
251-
252249
"""
253250
SizedArray{Tuple{dims...}}(array)
254251
@@ -265,7 +262,7 @@ struct SizedArray{S<:Tuple,T,N,M,TData<:AbstractArray{T,M}} <: StaticArray{S,T,N
265262
data::TData
266263

267264
function SizedArray{S,T,N,M,TData}(a::TData) where {S<:Tuple,T,N,M,TData<:AbstractArray{T,M}}
268-
require_one_based_indexing(a)
265+
Base.require_one_based_indexing(a)
269266
if size(a) != size_to_tuple(S) && size(a) != (tuple_prod(S),)
270267
throw(DimensionMismatch("Dimensions $(size(a)) don't match static size $S"))
271268
end

0 commit comments

Comments
 (0)