Skip to content

Conversation

@N5N3
Copy link
Member

@N5N3 N5N3 commented Dec 2, 2022

This PR fixes the bug caused by the trimming trick.
Base.index_lengths is not a proper tool to calculate the trimmed shape as indices might consume more than 1 dim.
And we can avoid the unneeded "repeat" when we meet Array{CartesianIndex{0}}

Test added.
Close #47644.

@N5N3 N5N3 added arrays [a, r, r, a, y, s] bugfix This change fixes an existing bug labels Dec 2, 2022
@N5N3 N5N3 force-pushed the fix-unaliascopy branch from 7c517f4 to 0002174 Compare April 23, 2023 14:21
@jishnub jishnub requested a review from vtjnash December 11, 2023 05:49
@N5N3 N5N3 merged commit e39e77f into JuliaLang:master Dec 11, 2023
@N5N3 N5N3 deleted the fix-unaliascopy branch December 11, 2023 23:12
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] bugfix This change fixes an existing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Base.unaliascopy for SubArray is broken for indices with AbstractArray{<:CartesianIndex}

2 participants