ArrayPartition violates the documentation of eltype
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Describe the bug 🐞
In some situations ArrayPartition violates the documentation of eltype:
eltype(type)
Determine the type of the elements generated by iterating a collection...
But this is not always the case (see MWE below).
As I understand the ArrayPartition declares eltype as a type that all udnerlying elements can be promoted to.
This behaviour might be by design, but it has a real practical implication.
Perhaps can be fixed on ForwardDiff side by extra promoting, but this can have other weird edge cases.
At the very least this behaviour can be documented as desired?
Minimal Reproducible Example 👇
julia> v = ArrayPartition([ 0.0 ], [ 1 ])
([0.0], [1])
julia> for e in v
@show e isa eltype(v)
end
e isa eltype(v) = true
e isa eltype(v) = false # would expect `true` here
Environment (please complete the following information):
- Output of
using Pkg; Pkg.status()
(jl_ZYBD4c) pkg> st
Status `/private/var/folders/kf/1t2_wf7n49sgxmzzmmgsb1j40000gn/T/jl_ZYBD4c/Project.toml`
[731186ca] RecursiveArrayTools v3.26.0
- Output of
versioninfo()
julia> versioninfo()
Julia Version 1.10.4
Commit 48d4fd48430 (2024-06-04 10:41 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: macOS (arm64-apple-darwin22.4.0)
CPU: 10 × Apple M2 Pro
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
Threads: 1 default, 0 interactive, 1 GC (on 6 virtual cores)
- Ngôn ngữ chính
- Julia
- Star
- 233
- Fork
- 76
- Merge trung bình
- 22 giờ 29 phút
- Pull request đã merge (30 ngày)
- 13
Chuẩn bị môi trường
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 1 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 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
SciML/RecursiveArrayTools.jl#619 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
SciML/RecursiveArrayTools.jl#570 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Re-enable downgrade CI testsĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 28/100
SciML/RecursiveArrayTools.jl#522 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của SciML/RecursiveArrayTools.jl
Issue tương tự
-
`default_linear_interpolation` is called with its arguments swapped, so its opt-outs never applyĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
SciML/OrdinaryDiffEq.jl#4684 · 1 bình luận ·
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 76/100
SciML/Evolutionary.jl#182 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
jmejia8/Metaheuristics.jl#130 ·
-
Upgrade plan for Julia version?Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
exercism/julia-test-runner#164 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100