diff --git a/src/clenshaw.jl b/src/clenshaw.jl index 24647e9..f6f7e35 100644 --- a/src/clenshaw.jl +++ b/src/clenshaw.jl @@ -131,6 +131,10 @@ function _broadcasted_layout_broadcasted_mul(::Tuple{AbstractWeightLayout,Polyno a = (w .* Q) * (Q \ v) a .* P end +_broadcasted_layout_broadcasted_mul(_, wv, P) = layout_broadcasted(nothing, *, wv, P) # default + + + # constructor for Clenshaw function Clenshaw(a::AbstractQuasiVector, X::AbstractQuasiMatrix) diff --git a/test/test_chebyshev.jl b/test/test_chebyshev.jl index 7f94c6b..8dc11b6 100644 --- a/test/test_chebyshev.jl +++ b/test/test_chebyshev.jl @@ -587,6 +587,14 @@ import BandedMatrices: isbanded @test chebyshevt(ChebyshevInterval()) ≡ ChebyshevT() @test chebyshevu(ChebyshevInterval()) ≡ ChebyshevU() end + + @testset "#256" begin + T = chebyshevt(0 .. 1) + s = axes(T, 1) + f = s .^ 2 + op = 2 * f .* T + @test op[0.1,1:5] ≈ 2f[0.1] * T[0.1,1:5] + end end struct QuadraticMap{T} <: Map{T} end