Skip to content

Commit

Permalink
define Base.stride
Browse files Browse the repository at this point in the history
  • Loading branch information
chriselrod committed May 13, 2022
1 parent ab003f5 commit a965445
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "StrideArraysCore"
uuid = "7792a7ef-975c-4747-a70f-980b88e8d1da"
authors = ["Chris Elrod <[email protected]> and contributors"]
version = "0.3.3"
version = "0.3.4"

[deps]
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
Expand Down
1 change: 1 addition & 0 deletions src/ptr_array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ end

@inline Base.size(A::AbstractStrideArray) = map(Int, size(A))
@inline Base.strides(A::AbstractStrideArray) = map(Int, strides(A))
@inline Base.stride(A::AbstractStrideArray, i::Int) = Base.strides(A)[i]

@inline create_axis(s, ::Zero) = CloseOpen(s)
@inline create_axis(s, ::One) = Base.OneTo(unsigned(s))
Expand Down

0 comments on commit a965445

Please sign in to comment.