Skip to content

Commit

Permalink
use Base.prod() to fix JuliaLang#523
Browse files Browse the repository at this point in the history
  • Loading branch information
rdeits committed Mar 21, 2018
1 parent 294f171 commit b35eaa7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ end
size(iter::CartesianIndices) = map(dimlength, first(iter).I, last(iter).I)
dimlength(start, stop) = stop-start+1

length(iter::CartesianIndices) = prod(size(iter))
length(iter::CartesianIndices) = Base.prod(size(iter))

first(iter::CartesianIndices) = CartesianIndex(map(first, iter.indices))
last(iter::CartesianIndices) = CartesianIndex(map(last, iter.indices))
Expand Down

0 comments on commit b35eaa7

Please sign in to comment.