ArrayPartition `A[:]` throws DimensionMismatch
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 65/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Julia
- Star
- 234
- Fork
- 77
- Merge trung bình
- 1 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 10
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của SciML/RecursiveArrayTools.jl
-
Docs: usage of j vs iĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
SciML/RecursiveArrayTools.jl#255 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
ArrayPartition of GPU arrays: norm, dot, Vector, any scalar-index; no KernelAbstractions.get_backendĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
SciML/RecursiveArrayTools.jl#676 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 67/100
SciML/RecursiveArrayTools.jl#675 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 57/100
SciML/RecursiveArrayTools.jl#674 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
JET: similar_type(::Any) no-matching-method in RecursiveArrayToolsRaggedArrays (pre-existing QA red)Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
SciML/RecursiveArrayTools.jl#620 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của SciML/RecursiveArrayTools.jl
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
SciML/Optimization.jl#1414 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
SciML/OrdinaryDiffEq.jl#4831 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
SciML/ModelingToolkitStandardLibrary.jl#529 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
EnzymeAD/ReactantServer.jl#103 ·
Maintainer thường phản hồi trong vòng 1 ngày