Skip to content

Commit

Permalink
Add ndims(::Type{CartesianRange})
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy committed Jul 3, 2015
1 parent ba064ad commit b0bca1c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions base/multidimensional.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ end
CartesianRange{N}(sz::NTuple{N,Int}) = CartesianRange(CartesianIndex(sz))

ndims(R::CartesianRange) = length(R.start)
ndims{I<:CartesianIndex}(::Type{CartesianRange{I}}) = length(I)

@generated function eachindex{T,N}(::LinearSlow, A::AbstractArray{T,N})
startargs = fill(1, N)
Expand Down

0 comments on commit b0bca1c

Please sign in to comment.