See this post for a discussion around this, and a workaround if you do need to collect zip:
function zip_collect(itr)
itrsize = Base.IteratorSize(itr)
itrsize isa Base.HasShape && (itrsize = Base.HasLength())
Base._collect(1:1, itr, Base.IteratorEltype(itr), itrsize)
end
Which works like this:
julia> collect(zip(rand(1:10, 10), 1:2:162))
ERROR: DimensionMismatch("dimensions must match")
julia> zip_collect(zip(rand(1:10, 10), 1:2:162))
10-element Array{Tuple{Int64,Int64},1}:
(10, 1)
(3, 3)
(2, 5)
(6, 7)
(1, 9)
(6, 11)
(2, 13)
(3, 15)
(6, 17)
(3, 19)
Warning: The above code uses the internal Base._collect
method which might not be a great idea in professional projects, since it could disappear or change behavior in a future version of Julia. It might be better to try to solve your problem in another way until the PR linked in the other post has been fixed.