Can't use empty vectors in `th_cheb2leg` or `th_leg2cheb`
还没有人认领这个 Issue。
评估
调研方向
从 src/toeplitzhankel.jl 开始,重点检查堆栈跟踪中确定的 plan_th_leg2cheb! 和 plan_th_cheb2leg! 路径。使用 Float64[] 重现这两个调用,并跟踪它们对零长度维度的处理。完成标准是 th_leg2cheb(Float64[]) 和 th_cheb2leg(Float64[]) 能够完成执行,且不会出现报告的 BoundsError 或无效维度错误。
由索引模型根据 Issue 内容生成。
描述
This originally came up in https://github.com/JuliaApproximation/ClassicalOrthogonalPolynomials.jl/issues/196
julia> FastTransforms.th_leg2cheb(Float64[])
ERROR: BoundsError: attempt to access 0×0 Matrix{Float64} at index [1, 1:0]
Stacktrace:
[1] throw_boundserror(A::Matrix{Float64}, I::Tuple{Int64, Base.Slice{Base.OneTo{Int64}}})
@ Base .\abstractarray.jl:737
[2] checkbounds
@ .\abstractarray.jl:702 [inlined]
[3] view
@ .\subarray.jl:184 [inlined]
[4] maybeview
@ .\views.jl:148 [inlined]
[5] dotview
@ .\broadcast.jl:1244 [inlined]
[6] _leg2chebTH_TLC(::Type{Float64}, mn::Tuple{Int64}, d::Int64)
@ FastTransforms C:\Users\danjv\.julia\packages\FastTransforms\S7huq\src\toeplitzhankel.jl:181
[7] _broadcast_getindex_evalf
@ .\broadcast.jl:709 [inlined]
[8] _broadcast_getindex
@ .\broadcast.jl:692 [inlined]
[9] #31
@ .\broadcast.jl:1118 [inlined]
[10] ntuple
@ .\ntuple.jl:48 [inlined]
[11] copy
@ .\broadcast.jl:1118 [inlined]
[12] materialize
@ .\broadcast.jl:903 [inlined]
[13] plan_th_leg2cheb!
@ C:\Users\danjv\.julia\packages\FastTransforms\S7huq\src\toeplitzhankel.jl:203 [inlined]
[14] plan_th_leg2cheb!
@ C:\Users\danjv\.julia\packages\FastTransforms\S7huq\src\toeplitzhankel.jl:651 [inlined]
[15] th_leg2cheb(::Vector{Float64})
@ FastTransforms C:\Users\danjv\.julia\packages\FastTransforms\S7huq\src\toeplitzhankel.jl:652
[16] top-level scope
@ REPL[20]:1
julia> FastTransforms.th_cheb2leg(Float64[])
ERROR: ArgumentError: invalid Array dimensions
Stacktrace:
[1] Array
@ .\boot.jl:477 [inlined]
[2] Array
@ .\boot.jl:486 [inlined]
[3] zeros
@ .\array.jl:636 [inlined]
[4] zeros
@ .\array.jl:632 [inlined]
[5] _cheb2legTH_TLC(::Type{Float64}, mn::Tuple{Int64}, d::Int64)
@ FastTransforms C:\Users\danjv\.julia\packages\FastTransforms\S7huq\src\toeplitzhankel.jl:218
[6] _broadcast_getindex_evalf
@ .\broadcast.jl:709 [inlined]
[7] _broadcast_getindex
@ .\broadcast.jl:692 [inlined]
[8] #31
@ .\broadcast.jl:1118 [inlined]
[9] ntuple
@ .\ntuple.jl:48 [inlined]
[10] copy
@ .\broadcast.jl:1118 [inlined]
[11] materialize
@ .\broadcast.jl:903 [inlined]
[12] plan_th_cheb2leg!
@ C:\Users\danjv\.julia\packages\FastTransforms\S7huq\src\toeplitzhankel.jl:235 [inlined]
[13] plan_th_cheb2leg!
@ C:\Users\danjv\.julia\packages\FastTransforms\S7huq\src\toeplitzhankel.jl:651 [inlined]
[14] th_cheb2leg(::Vector{Float64})
@ FastTransforms C:\Users\danjv\.julia\packages\FastTransforms\S7huq\src\toeplitzhankel.jl:652
[15] top-level scope
@ REPL[21]:1
- 主要语言
- Julia
- 星标
- 282
- 派生
- 27
- 平均合并
- 9 小时 21 分钟
- 30 天内合并 PR
- 2
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
JuliaApproximation/FastTransforms.jl 的其他 Issue
-
Loading FastTransforms.jl can make FFTs via FFTW.jl 100x slower due to threading conflicts可能已有人在做 @dlfivefifty 于 99 天前认领。 未关闭
JuliaApproximation/FastTransforms.jl#267 · 2 个 reaction · 已指派 2 人 ·
-
难度 3/5 1-2 天 新手友好度 38/100
JuliaApproximation/FastTransforms.jl#266 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 42/100
JuliaApproximation/FastTransforms.jl#263 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
JuliaApproximation/FastTransforms.jl#257 · 1 条评论 ·
-
Allocating lmul!未关闭
难度 4/5 3-5 天 新手友好度 25/100
JuliaApproximation/FastTransforms.jl#253 · 7 条评论 ·
查看 JuliaApproximation/FastTransforms.jl 的全部 Issue
相似的 Issue
-
enhancement good first issue help wanted
难度 2/5 半天 新手友好度 82/100
-
难度 2/5 1-3 小时 新手友好度 78/100
SciML/SciMLBase.jl#1643 ·
维护者通常 2 天内回复
-
authority-vechtstromen ready-for-agent
难度 1/5 1 小时以内 新手友好度 75/100
Deltares/Ribasim-NL#890 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
JuliaLinearAlgebra/GenericLinearAlgebra.jl#183 · 1 条评论 ·