Skip to content

Commit 54f737b

Browse files
committed
restore backwards compatibility
1 parent 6101da2 commit 54f737b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/wrappers.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ function index_to_parentindex(a::ReshapedArray, I::CartesianIndex)
7474
return CartesianIndices(parent(a))[LinearIndices(size(a))[I]]
7575
end
7676

77+
function eachstoredparentindex(a::SubArray)
78+
return filter(eachstoredindex(parent(a))) do I
79+
return all(d -> I[d] parentindices(a)[d], 1:ndims(parent(a)))
80+
end
81+
end
7782
function eachstoredparentindex(style::IndexStyle, a::SubArray)
7883
return filter(eachstoredindex(style, parent(a))) do I
7984
return all(d -> I[d] parentindices(a)[d], 1:ndims(parent(a)))

0 commit comments

Comments
 (0)