Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Strides on when SubArray has a scalar sub index

Open
#11 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
julia
Domain
data

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.

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?

Dominant language
Julia
Stars
14
Forks
8
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JuliaArrays/StaticArrayInterface.jl

All issues in JuliaArrays/StaticArrayInterface.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.