Closed mforets closed 6 years ago
This appears to be a bug in Julia's Iterators, probably in the implementation for isdone
.
julia> collect(Iterators.product([[1, -1], [1, -1]]))
2-element Array{Tuple{Array{Int64,1}},1}:
([1, -1],)
([1, -1],)
julia> collect(Iterators.product(Iterators.repeated([1, -1], 2)))
ERROR: MethodError: no method matching isless(::Array{Int64,1}, ::Int64)
Closest candidates are:
isless(::Missing, ::Any) at missing.jl:66
isless(::AbstractFloat, ::Real) at operators.jl:150
isless(::Real, ::Real) at operators.jl:338
...
Stacktrace:
[1] <(::Array{Int64,1}, ::Int64) at ./operators.jl:260
[2] <=(::Array{Int64,1}, ::Int64) at ./operators.jl:309
[3] isdone(::Base.Iterators.Take{Base.Iterators.Repeated{Array{Int64,1}}}, ::Tuple{Array{Int64,1},Tuple{Int64,Nothing}}) at ./iterators.jl:588
[4] _pisdone at ./iterators.jl:806 [inlined]
[5] isdone at ./iterators.jl:812 [inlined]
[6] iterate at ./iterators.jl:844 [inlined]
[7] copyto! at ./abstractarray.jl:658 [inlined]
[8] _collect(::UnitRange{Int64}, ::Base.Iterators.ProductIterator{Tuple{Base.Iterators.Take{Base.Iterators.Repeated{Array{Int64,1}}}}}, ::Base.HasEltype, ::Base.HasShape{1}) at ./array.jl:563
[9] collect(::Base.Iterators.ProductIterator{Tuple{Base.Iterators.Take{Base.Iterators.Repeated{Array{Int64,1}}}}}) at ./array.jl:557
[10] top-level scope at none:0
Thanks for reporting, I'll look into the Julia issue
Seems fixed?
Yes.
in v0.6:
in v0.7.0-beta2.0
could you confirm that this is a unresolved issue? or i need to upgrade some of the packages in my workflow? thanks.