JuliaArrays / JuliaArrays/StaticArrayInterface.jl
Strides on when SubArray has a scalar sub index
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 14
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
I've been getting incorrect results when using scalar indexing that doesn't start with one on views.
julia> A = zeros(3, 4, 5);
julia> A[:] = 1:60;
julia> Aview = view(A, :, 2, :);
julia> ArrayInterface.StrideIndex(Aview)[1,1]
1
julia> Aview[1,1]
4.0
julia> Aview = view(A, 2, :, :);
julia> ArrayInterface.StrideIndex(Aview)[1,1]
1
julia> Aview[1,1]
2.0
Should we be combining those scalar indices with strides?
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.
Research direction
Reproduce the two examples in the Julia REPL, focusing on ArrayInterface.StrideIndex with views that use scalar indices. Read the StrideIndex implementation and compare its results with Aview indexing; done means both reported indices match the corresponding Aview values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100