Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Ragged VectorOfArray: R[i,j] zero-pads but R[i,:] and R[i,1:k] throw BoundsError

Aberta
#674 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 2 dias

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
57/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Domínio
backend

Direção de pesquisa

Start at the row-slice paths in src/vector_of_array.jl:668 for VectorOfArray and :696 for DiffEqArray, and compare them with scalar indexing and Array(R) behavior. Reproduce with the provided ragged-array example; related issues #208 and #118 may clarify expected semantics. Done means row slices and scalar indexing consistently either zero-pad or throw, with tests covering the chosen behavior.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

On a ragged VectorOfArray, scalar indexing zero-pads, but row slices throw. The two disagree about whether the array is padded.

using RecursiveArrayTools
R = VectorOfArray([[1.0, 2.0], [3.0], [4.0, 5.0, 6.0]])
R[2, 2]       # 0.0 (zero-padded)
R[2, :]       # BoundsError: attempt to access 1-element Vector at index [2]
R[2, 1:3]     # BoundsError
stack(R)      # DimensionMismatch

The row-slice path is src/vector_of_array.jl:668 for VectorOfArray (and :696 for DiffEqArray). It indexes each inner array directly. Either row slices should zero-pad the way R[i,j] and Array(R) do, or R[i,j] should throw. Related: #208 and #118.

Found in a measurement audit of RecursiveArrayTools.jl master 02c477c (v4.5.3). It reproduces on Julia 1.12.4 and 1.10.12, and the reproducer above was re-run as written before filing.

🤖 Filed by Claude Code (model: claude-opus-5-5[1m]) on behalf of @ChrisRackauckas. The audit was done by a Claude Code Opus 5.5 subagent. Session: https://claude.ai/code/session_01LPHREnnonfLg1VcE1EJovv

Linguagem predominante
Julia
Estrelas
234
Forks
77
Merge médio
1d 17h
PRs com merge (30d)
17

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de SciML/RecursiveArrayTools.jl

Todas as issues de SciML/RecursiveArrayTools.jl

Issues semelhantes

Mais issues de Julia

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.