Skip to content

Commit 0d039cd

Browse files
Generalize from Array to DenseArray where possible in stridelayout (#243)
* Generalize from `Array` to `DenseArray` where possible in stridelayout * Bump version number I suppose Version number not found!?! * Have to subtype DenseArray rather than substitute directly * Bump version to 5.0.3
1 parent b2304bd commit 0d039cd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ArrayInterface"
22
uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
3-
version = "5.0.2"
3+
version = "5.0.3"
44

55
[deps]
66
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"

src/stridelayout.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ function contiguous_axis(::Type{T}) where {T}
117117
return contiguous_axis(parent_type(T))
118118
end
119119
end
120-
contiguous_axis(::Type{<:Array}) = One()
120+
contiguous_axis(::Type{<:DenseArray}) = One()
121121
contiguous_axis(::Type{<:BitArray}) = One()
122122
contiguous_axis(::Type{<:AbstractRange}) = One()
123123
contiguous_axis(::Type{<:Tuple}) = One()
@@ -220,7 +220,7 @@ function stride_rank(::Type{T}) where {T}
220220
return stride_rank(parent_type(T))
221221
end
222222
end
223-
stride_rank(::Type{Array{T,N}}) where {T,N} = nstatic(Val(N))
223+
stride_rank(::Type{<:DenseArray{T,N}}) where {T,N} = nstatic(Val(N))
224224
stride_rank(::Type{BitArray{N}}) where {N} = nstatic(Val(N))
225225
stride_rank(::Type{<:AbstractRange}) = (One(),)
226226
stride_rank(::Type{<:Tuple}) = (One(),)

0 commit comments

Comments
 (0)