diff --git a/src/bases/fourier/fourier.jl b/src/bases/fourier/fourier.jl index 421cd170..ce2048a3 100644 --- a/src/bases/fourier/fourier.jl +++ b/src/bases/fourier/fourier.jl @@ -25,7 +25,6 @@ name(b::Fourier) = "Fourier series" # The default numeric type is Float64 Fourier(n::Int) = Fourier{Float64}(n) -convert(::Type{Fourier{T}}, d::Fourier{T}) where {T} = d convert(::Type{Fourier{T}}, d::Fourier) where {T} = Fourier{T}(d.n) @deprecate Fourier(n, a::Number, b::Number) Fourier(n)→a..b diff --git a/src/bases/poly/chebyshev/ChebyshevT.jl b/src/bases/poly/chebyshev/ChebyshevT.jl index e46f4d3c..c0a5c086 100644 --- a/src/bases/poly/chebyshev/ChebyshevT.jl +++ b/src/bases/poly/chebyshev/ChebyshevT.jl @@ -14,6 +14,8 @@ ChebyshevT(n::Int) = ChebyshevT{Float64}(n) similar(b::ChebyshevT, ::Type{T}, n::Int) where {T} = ChebyshevT{T}(n) +convert(::Type{ChebyshevT{T}}, d::ChebyshevT) where {T} = ChebyshevT{T}(d.n) + "Mapped Chebyshev polynomials." struct MappedChebyshev{T} <: MappedDict{T,T} superdict :: ChebyshevT{T} diff --git a/test/test_chebyshev.jl b/test/test_chebyshev.jl index 5117d265..537fdb54 100644 --- a/test/test_chebyshev.jl +++ b/test/test_chebyshev.jl @@ -8,6 +8,7 @@ function test_chebyshev_expansions(T) g = BasisFunctions.secondgrid(b) BasisFunctions.Test.test_generic_dict_transform(b, g) BasisFunctions.Test.test_generic_dict_transform(complex(b), g) + @test convert(ChebyshevT{BigFloat}, ChebyshevT{T}(10)) isa ChebyshevT{BigFloat} end @test support(b) == ChebyshevInterval{T}() diff --git a/test/test_fourier.jl b/test/test_fourier.jl index c1af724d..78f2283c 100644 --- a/test/test_fourier.jl +++ b/test/test_fourier.jl @@ -17,6 +17,8 @@ function test_fourier_series(T) @test support(fb0) == UnitInterval{T}() + @test convert(Fourier{BigFloat}, Fourier{Float64}(10)) isa Fourier{BigFloat} + ## Even length n = 12 a = -T(1.2)