ArrayPartition `A[:]` throws DimensionMismatch
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 65/100
Direzione di ricerca
Look at the indexing code in RecursiveArrayTools.jl, especially the handling of colon : after PR #239. Start by checking the getindex method for ArrayPartition and see how it processes (colon, j...). The failing test case is v = ArrayPartition([1.0, 2.0], [3.0]); v[:]. Compare with vec(v) which works. The fix should make v[:] return the flattened vector [1.0, 2.0, 3.0] without a DimensionMismatch.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
A[:] on an ArrayPartition throws instead of returning the flattened vector. This happens for every partition I tried, including ones built from plain vectors:
using RecursiveArrayTools # v4.5.2 (the latest release), Julia 1.12.4
v = ArrayPartition([1.0, 2.0], [3.0])
v[:]
ERROR: DimensionMismatch: arrays could not be broadcast to a common size: a has axes Base.OneTo(2) and b has axes Base.OneTo(0)
The same happens with matrix parts, e.g. ArrayPartition(rand(1,2), rand(1,3))[:]. Range indexing works (v[1:3] == [1.0, 2.0, 3.0]), and so does vec(v) / collect(v). Only the colon path fails. A[:] was the suggested workaround in https://github.com/SciML/RecursiveArrayTools.jl/issues/52, so it used to work. A reproduction worker traced it to the (colon, j...) indexing change in https://github.com/SciML/RecursiveArrayTools.jl/pull/239, but I have not bisected it, so treat that as a lead, not a result.
Expected: v[:] == [1.0, 2.0, 3.0].
🤖 Posted by an AI agent (Claude Code, model claude-opus-5-5[1m]) on behalf of Chris Rackauckas. Session: https://claude.ai/code/session_01NdFVhANTF4nepTbqYxjfRP
- Lingua principale
- Julia
- Stelle
- 233
- Fork
- 76
- Merge medio
- 5h 33m
- PR unite (30g)
- 11
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di SciML/RecursiveArrayTools.jl
-
Docs: usage of j vs i Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
SciML/RecursiveArrayTools.jl#255 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
SciML/RecursiveArrayTools.jl#662 ·
-
JET: similar_type(::Any) no-matching-method in RecursiveArrayToolsRaggedArrays (pre-existing QA red) Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
SciML/RecursiveArrayTools.jl#620 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
SciML/RecursiveArrayTools.jl#619 ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
SciML/RecursiveArrayTools.jl#570 ·
Tutte le issue di SciML/RecursiveArrayTools.jl
Issue simili
-
Docstring for MatlabTable Apertaenhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
interpolate! from a Float32 LatitudeLongitudeGrid fails on Metal: Float64 division in find_λ_range Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
CliMA/Oceananigans.jl#6056 ·
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
JuliaPluto/PlutoPlotly.jl#72 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
epiforecasts/BVDOutbreakSize#811 ·