JuliaApproximation / JuliaApproximation/MultivariateOrthogonalPolynomials.jl
Error when expanding one triangle basis function in another
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 20
- Forks
- 6
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 1
Description
I thought this would work, but there's a type issue
julia> n, k, a, b, c = 5, 3, 0.123, 0.456, 0.789
(5, 3, 0.123, 0.456, 0.789)
julia> P = JacobiTriangle()
JacobiTriangle(0, 0, 0)
julia> Pabc = JacobiTriangle(a, b, c)
JacobiTriangle(0.123, 0.456, 0.789)
julia> f = expand(P, splat((x,y) -> Pabc[SVector(x, y), Block(n+1)[k+1]]))
ERROR: MethodError: no method matching *(::FastTransforms.FTPlan{Float64, 2, FastTransforms.TRIANGLEANALYSIS}, ::Matrix{Any})
Closest candidates are:
*(::Any, ::Any, ::Any, ::Any...)
@ Base operators.jl:587
*(::FastTransforms.IChebyshevTransformPlan{T, kind, K, false, N}, ::AbstractArray{T, N}) where {T, kind, K, N}
@ FastTransforms ~/.julia/dev/FastTransforms/src/chebyshevtransform.jl:325
*(::FillArrays.AbstractZeros{T, 2} where T, ::AbstractMatrix)
@ FillArrays ~/.julia/packages/FillArrays/Ksvco/src/fillalgebra.jl:97
...
Stacktrace:
[1] *(T::MultivariateOrthogonalPolynomials.TriPlan{Float64}, F::Matrix{Any})
@ MultivariateOrthogonalPolynomials ~/.julia/dev/MultivariateOrthogonalPolynomials/src/triangle.jl:823
[2] \(a::ContinuumArrays.TransformFactorization{…}, b::QuasiArrays.BroadcastQuasiVector{…})
@ ContinuumArrays ~/.julia/packages/ContinuumArrays/yY1lG/src/plans.jl:26
[3] transform_ldiv_size(::Tuple{…}, A::QuasiArrays.SubQuasiArray{…}, B::QuasiArrays.BroadcastQuasiVector{…})
@ ContinuumArrays ~/.julia/packages/ContinuumArrays/yY1lG/src/bases/bases.jl:341
[4] transform_ldiv(A::QuasiArrays.SubQuasiArray{…}, B::QuasiArrays.BroadcastQuasiVector{…})
@ ContinuumArrays ~/.julia/packages/ContinuumArrays/yY1lG/src/bases/bases.jl:342
[5] adaptivetransform_ldiv(A::JacobiTriangle{Float64, Int64}, f::QuasiArrays.BroadcastQuasiVector{Any, Base.Splat{var"#55#56"}, Tuple{Inclusion{…}}})
@ ClassicalOrthogonalPolynomials ~/.julia/packages/ClassicalOrthogonalPolynomials/cd3TK/src/adaptivetransform.jl:37
[6] transform_ldiv_size(::Tuple{…}, A::JacobiTriangle{…}, f::QuasiArrays.BroadcastQuasiVector{…})
@ ClassicalOrthogonalPolynomials ~/.julia/packages/ClassicalOrthogonalPolynomials/cd3TK/src/adaptivetransform.jl:2
[7] transform_ldiv(A::JacobiTriangle{Float64, Int64}, B::QuasiArrays.BroadcastQuasiVector{Any, Base.Splat{var"#55#56"}, Tuple{Inclusion{…}}})
@ ContinuumArrays ~/.julia/packages/ContinuumArrays/yY1lG/src/bases/bases.jl:342
[8] basis_ldiv_size
@ ~/.julia/packages/ContinuumArrays/yY1lG/src/bases/bases.jl:393 [inlined]
[9] copy
@ ~/.julia/packages/ContinuumArrays/yY1lG/src/bases/bases.jl:385 [inlined]
[10] materialize(M::ArrayLayouts.Ldiv{…}; kwds::@Kwargs{})
@ ArrayLayouts ~/.julia/packages/ArrayLayouts/RCHQ8/src/ldiv.jl:22
[11] materialize
@ ~/.julia/packages/ArrayLayouts/RCHQ8/src/ldiv.jl:22 [inlined]
[12] ldiv
@ ~/.julia/packages/ArrayLayouts/RCHQ8/src/ldiv.jl:98 [inlined]
[13] \
@ ~/.julia/packages/QuasiArrays/epj8s/src/matmul.jl:34 [inlined]
[14] transform(A::JacobiTriangle{Float64, Int64}, f::Function)
@ ContinuumArrays ~/.julia/packages/ContinuumArrays/yY1lG/src/bases/bases.jl:354
[15] expand(A::JacobiTriangle{Float64, Int64}, f::Function)
@ ContinuumArrays ~/.julia/packages/ContinuumArrays/yY1lG/src/bases/bases.jl:365
[16] top-level scope
@ REPL[126]:1
Some type information was truncated. Use `show(err)` to see complete types.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Julia example from the issue, then start at src/triangle.jl:823, where TriPlan multiplication receives the Matrix{Any}. Trace how the function passed to expand produces that matrix and compare it with the expected numeric element type. Done means the example expands without the reported MethodError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100