Commit c07893d
Cartesian indexing for SubArrays with non-integer AbstractRanges (#52094)
With #50457 now merged, an `AbstractRange` of `CartesianIndex`es should
use `CartesianIndexing` in constructing a `SubArray`. I've limited the
method to integer ranges, as this is the case where we know for sure
that the indexing may be linear.
Fixes
```julia
julia> view(1:2, StepRangeLen(CartesianIndex(1), CartesianIndex(1), 0))
0-element view(::UnitRange{Int64}, StepRangeLen(CartesianIndex(1,), CartesianIndex(1,), 0)) with eltype Int64
```
---------
Co-authored-by: N5N3 <[email protected]>1 parent ec3911c commit c07893d
2 files changed
+12
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
56 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
809 | 809 | | |
810 | 810 | | |
811 | 811 | | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
0 commit comments