-
-
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
One-dimensional views assume their range index is 1-indexed #37199
Labels
bug
Indicates an unexpected problem or unintended behavior
Comments
mbauman
changed the title
Views created with Base.IdentityUnitRange as an axis use incorrect linear indexing
Views assume all range indexes are 1-indexed
Aug 25, 2020
This is just an overzealous |
mbauman
changed the title
Views assume all range indexes are 1-indexed
One-dimensional views assume their range index is 1-indexed
Aug 25, 2020
mbauman
added a commit
that referenced
this issue
Aug 25, 2020
We had been assuming that IdentityUnitRange matched the indices of the parent (like Slices) but they define their own offset axes. Further, other `AbstractRanges` may be similarly offset. We do not need to consider other offset `AbstractArrays` as this code only applies to `IndexLinear` `SubArray`s.
simeonschaub
pushed a commit
to simeonschaub/julia
that referenced
this issue
Aug 29, 2020
…Lang#37204) We had been assuming that IdentityUnitRange matched the indices of the parent (like Slices) but they define their own offset axes. Further, other `AbstractRanges` may be similarly offset. We do not need to consider other offset `AbstractArrays` as this code only applies to `IndexLinear` `SubArray`s.
KristofferC
pushed a commit
that referenced
this issue
Sep 7, 2020
We had been assuming that IdentityUnitRange matched the indices of the parent (like Slices) but they define their own offset axes. Further, other `AbstractRanges` may be similarly offset. We do not need to consider other offset `AbstractArrays` as this code only applies to `IndexLinear` `SubArray`s. (cherry picked from commit 701885b)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This happens if the range used to create the view does not span the entire axis of the parent array
The text was updated successfully, but these errors were encountered: