-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with nested loops #86
Labels
Comments
The issue is julia> using ChunkSplitters
julia> collect(chunks(11:10; n=6))
ERROR: ArgumentError: You must either indicate the desired number of chunks (n) or the target size of a chunk (size).
Stacktrace:
[1] missing_input_err()
@ ChunkSplitters ~/.julia/packages/ChunkSplitters/R5lnx/src/ChunkSplitters.jl:118
[2] getchunk(itr::UnitRange{Int64}, ichunk::Int64; n::Int64, size::Int64, split::Symbol)
@ ChunkSplitters ~/.julia/packages/ChunkSplitters/R5lnx/src/ChunkSplitters.jl:274
[3] getchunk
@ ~/.julia/packages/ChunkSplitters/R5lnx/src/ChunkSplitters.jl:273 [inlined]
[4] getchunk
@ ~/.julia/packages/ChunkSplitters/R5lnx/src/ChunkSplitters.jl:293 [inlined]
[5] iterate
@ ~/.julia/packages/ChunkSplitters/R5lnx/src/ChunkSplitters.jl:142 [inlined]
[6] iterate
@ ~/.julia/packages/ChunkSplitters/R5lnx/src/ChunkSplitters.jl:141 [inlined]
[7] copyto!(dest::Vector{StepRange{Int64, Int64}}, src::ChunkSplitters.Chunk{UnitRange{Int64}, ChunkSplitters.FixedCount})
@ Base ./abstractarray.jl:943
[8] _collect
@ ./array.jl:765 [inlined]
[9] collect(itr::ChunkSplitters.Chunk{UnitRange{Int64}, ChunkSplitters.FixedCount})
@ Base ./array.jl:759
[10] top-level scope
@ REPL[32]:1 It occurs because for Regular for loops support this case (i.e. they don't to anything) so we should as well. However, at least partially, this is an upstream issue because the error message above is clearly wrong and bad. On our side, we might consider checking |
This was referenced Mar 17, 2024
Will be fixed by #88 (in the next release). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am trying to get @tasks to work with a nested loop and am able to
find what I need in the docs. Herewith a MWE:
I've tried using
@set
but with no luck.I run Julia from a directory with only this file in it.
The text was updated successfully, but these errors were encountered: