Skip to content
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

Compatible parent index when displaying dots in SubArrays #52097

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

jishnub
Copy link
Contributor

@jishnub jishnub commented Nov 9, 2023

Fix #52095 by passing the reindexed indices through to_indices to convert them to Integers. This should strip CartesianIndexes in particular, which resolves the issue.

Fixes:

julia> view(1:2, [CartesianIndex(2)])
1-element view(::UnitRange{Int64}, CartesianIndex{1}[CartesianIndex(2,)]) with eltype Int64:
 2

@jishnub jishnub added the arrays [a, r, r, a, y, s] label Nov 9, 2023
@N5N3 N5N3 merged commit 4689850 into master Nov 16, 2023
7 of 9 checks passed
@N5N3 N5N3 deleted the jishnub/viewdisplaytoindices branch November 16, 2023 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrays [a, r, r, a, y, s]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error in displaying SubArrays with AbstractVector{<:CartesianIndex} indices
2 participants