JuliaArrays / JuliaArrays/StaticArrays.jl

StaticIndexing breaks the `to_indices` interface

Open
#1,204 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
844
Forks
159
Avg merge
3d 21h
Merged PRs (30d)
3

Description

The to_indices docs state that:

The returned tuple must only contain either Ints or AbstractArrays of scalar indices that are supported by array A

But StaticIndexing is not either:

https://github.com/JuliaArrays/StaticArrays.jl/blob/217e6f10a01433b8a60b679622065bc8702da923/src/indexing.jl#L213-L221

See discourse:
https://discourse.julialang.org/t/a-sparse-matrix-cannot-be-indexed-by-a-svector/104265/5

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.

Research direction

Start with the to_indices contract described in the issue and inspect src/indexing.jl at lines 213-221, then review the linked Discourse discussion. Determine whether StaticIndexing or the documented interface is inconsistent, and verify that the chosen resolution makes the sparse-matrix indexing example conform to the contract.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.