Slicing an `SArray` with a `CartesianIndices(::StaticArray)` may return an `SArray`
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the SMatrix slicing examples with axes(m3) and CartesianIndices(m3) in the Julia REPL. Trace the indexing entry point for CartesianIndices over StaticArrays and add or update coverage for the result type; done means both forms return the intended SArray type with the shown values.
Written by the indexing model from the issue text.
Description
Currently,
julia> m4 = SMatrix{4,4,Int,16}(1:16)
4×4 SMatrix{4, 4, Int64, 16} with indices SOneTo(4)×SOneTo(4):
1 5 9 13
2 6 10 14
3 7 11 15
4 8 12 16
julia> m3 = SMatrix{3,3,Int,9}(1:9)
3×3 SMatrix{3, 3, Int64, 9} with indices SOneTo(3)×SOneTo(3):
1 4 7
2 5 8
3 6 9
julia> m4[axes(m3)...]
3×3 SMatrix{3, 3, Int64, 9} with indices SOneTo(3)×SOneTo(3):
1 5 9
2 6 10
3 7 11
julia> m4[CartesianIndices(m3)]
3×3 MMatrix{3, 3, Int64, 9} with indices SOneTo(3)×SOneTo(3):
1 5 9
2 6 10
3 7 11
I think this may return an SMatrix as well
- Dominant language
- Julia
- Stars
- 844
- Forks
- 159
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 3
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from JuliaArrays/StaticArrays.jl
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
JuliaArrays/StaticArrays.jl#1076 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 67/100
JuliaArrays/StaticArrays.jl#1354 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 66/100
JuliaArrays/StaticArrays.jl#1351 ·
-
Cholesky Update Open
Difficulty 5/5 Over a week Newbie friendliness 38/100
JuliaArrays/StaticArrays.jl#1346 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
JuliaArrays/StaticArrays.jl#1345 · 3 comments ·
All issues in JuliaArrays/StaticArrays.jl
Similar issues
-
tagbot-manual
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Sienna-Platform/PowerSystems.jl#1800 ·
-
enhancement good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100