Skip to content

Commit d1b4098

Browse files
committed
Added Base.endof method for Axis type
1 parent 6c8cd0e commit d1b4098

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/indexing.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ using Base: ViewIndex
88
# Simple scalar indexing where we just set or return scalars
99
@inline Base.getindex(A::AxisArray, idxs::Int...) = A.data[idxs...]
1010
@inline Base.setindex!(A::AxisArray, v, idxs::Int...) = (A.data[idxs...] = v)
11+
@inline Base.endof(A::Axis) = length(A)
1112

1213
# Cartesian iteration
1314
Base.eachindex(A::AxisArray) = eachindex(A.data)

0 commit comments

Comments
 (0)