-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
"end" indexing not working properly #19
Comments
Thanks the best thing to do would be to try and fix this. @mbauman might have ideas? |
This is effectively the same as JuliaLang/julia#35681 and won't be fixable until that one is. |
Can we add a note of this in the Readme? Like a warning admonition. |
Yeah, it's worth mentioning. |
Would it make sense to add a pointer to EndpointRanges.jl in the README note? Using julia> using EllipsisNotation
julia> using EndpointRanges
julia> A = randn(2,3,4);
julia> @show size(A[.., 1:iend]);
size(A[.., 1:iend]) = (2, 3, 4)
julia> A[.., 1:iend] == A
true
|
Sounds like a good idea, please submit a PR |
I believe there is something wrong with indexing.
Code:
Output:
The output should size should be
(2, 3, 4)
not(2, 3, 3)
.I believe this is a critical issue and should be noted somewhere.
What is happeneing is that end will be equal to size(A, 2), which is 3 and not size(A, 3) which is 4 what is the real position of the "end" in this case.
Also worth noting:
@show size(A[.., 1:end-1]) # outputs: (2, 3, 2)
So basically at least the problem is with indexing positions and nothing more.
The text was updated successfully, but these errors were encountered: