-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
eachindex
should throw DimensionMismatch
for differently sized tuples
#47898
Comments
This also seems to behave incorrectly: julia> itr0 = (i for i in 1:0);
julia> itr1 = (i for i in 1:1);
julia> eachindex(itr0)
0-element LinearIndices{1, Tuple{Base.OneTo{Int64}}}
julia> eachindex(itr1)
1-element LinearIndices{1, Tuple{Base.OneTo{Int64}}}:
1
julia> eachindex(itr0, itr1)
ERROR: MethodError: no method matching keys(::Base.Generator{UnitRange{Int64}, typeof(identity)}, ::Base.Generator{UnitRange{Int64}, typeof(identity)}) Not sure if |
Hi, I am new to coding, and I want to work on this issue. |
Is the issue closed ?. if not I would like to work on it. |
not closed, but #48125 looks like it will fix this once it merges. |
Ok thank you |
I would like to work on this |
Currently, we have
From the documentation of
eachindex
, I expected aDimensionMismatch
instead. Like this:(Previous discussion on slack: https://julialang.slack.com/archives/C6A044SQH/p1671032794309049)
The text was updated successfully, but these errors were encountered: