Skip to content

Commit

Permalink
Add size(::LinearIndices) on older 0.7 versions
Browse files Browse the repository at this point in the history
  • Loading branch information
nalimilan committed Feb 4, 2018
1 parent 1b10dfd commit d549627
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1383,6 +1383,8 @@ end
@inbounds result = reshape(1:prod(dims), dims)[(I .- first.(iter.indices) .+ 1)...]
return result
end
elseif VERSION < v"0.7.0-DEV.3395"
Base.size(iter::LinearIndices{N,R}) where {N,R} = length.(iter.indices)
end

@static if !isdefined(Base, Symbol("@info"))
Expand Down

0 comments on commit d549627

Please sign in to comment.