Skip to content

Commit 53244ac

Browse files
authored
Fix #139 (#195)
1 parent bed20a3 commit 53244ac

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ArrayLayouts = "1.3.1"
2929
BandedMatrices = "1"
3030
BlockArrays = "1"
3131
BlockBandedMatrices = "0.13"
32-
ContinuumArrays = "0.18"
32+
ContinuumArrays = "0.18.3"
3333
DomainSets = "0.6, 0.7"
3434
FFTW = "1.1"
3535
FastGaussQuadrature = "1"

test/test_chebyshev.jl

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using ClassicalOrthogonalPolynomials, QuasiArrays, ContinuumArrays, BandedMatrices, LazyArrays,
2-
FastTransforms, ArrayLayouts, Test, FillArrays, Base64, BlockArrays, LazyBandedMatrices, ForwardDiff
2+
FastTransforms, ArrayLayouts, Test, FillArrays, Base64, BlockArrays, LazyBandedMatrices
3+
using ForwardDiff
34
import ClassicalOrthogonalPolynomials: Clenshaw, recurrencecoefficients, clenshaw, paddeddata, jacobimatrix, oneto, Weighted, MappedOPLayout
45
import LazyArrays: ApplyStyle
56
import QuasiArrays: MulQuasiMatrix
@@ -104,7 +105,7 @@ import BandedMatrices: isbanded
104105
@testset "ChebyshevU" begin
105106
U = ChebyshevU()
106107
@test U == chebyshevu()
107-
@test U  ChebyshevT()
108+
@test U ChebyshevT()
108109
x = axes(U,1)
109110
F = factorize(U[:,oneto(5)])
110111
@test @inferred(F \ x) [0,0.5,0,0,0]
@@ -261,7 +262,7 @@ import BandedMatrices: isbanded
261262

262263
WT̃ = w[2x .- 1] .* T[2x .- 1, :]
263264
@test MemoryLayout(WT̃) isa WeightedBasisLayout{MappedOPLayout}
264-
@test WT̃  T[2x .- 1, :]
265+
@test WT̃ T[2x .- 1, :]
265266
v = WT̃ * (WT̃ \ @.(exp(x)/(sqrt(x)*sqrt(1-x))))
266267
@test v[0.1] let x = 0.1; exp(x)/(sqrt(x)*sqrt(1-x)) end
267268

@@ -364,7 +365,7 @@ import BandedMatrices: isbanded
364365
@test Chebyshev() == ChebyshevT() == ChebyshevT{Float32}()
365366
@test ChebyshevU() == ChebyshevU{Float32}()
366367
@test Chebyshev{3}() == Chebyshev{3,Float32}()
367-
@test Chebyshev()  ChebyshevU()
368+
@test Chebyshev() ChebyshevU()
368369
end
369370

370371
@testset "sum" begin
@@ -569,6 +570,14 @@ import BandedMatrices: isbanded
569570
A = T \ (a.(x, 0.) .* T)
570571
@test iszero(A[1,1])
571572
end
573+
574+
@testset "complex rhs (#139)" begin
575+
T = Chebyshev()
576+
x = axes(T,1)
577+
@test T[:,OneTo(5)] \ exp.(im*x) == T[:,1:5] \ exp.(im*x) == ChebyshevT{ComplexF64}()[:,1:5] \ exp.(im*x)
578+
@test T \ exp.(im*x) transform(T, x -> exp(im*x))
579+
@test expand(T, x -> exp(im*x))[0.1] exp(im*0.1)
580+
end
572581
end
573582

574583
struct QuadraticMap{T} <: Map{T} end

test/test_jacobi.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using ClassicalOrthogonalPolynomials, FillArrays, BandedMatrices, ContinuumArrays, QuasiArrays, LazyArrays, LazyBandedMatrices, FastGaussQuadrature, Test
2-
import ClassicalOrthogonalPolynomials: recurrencecoefficients, basis, MulQuasiMatrix, arguments, Weighted, HalfWeighted
2+
import ClassicalOrthogonalPolynomials: recurrencecoefficients, basis, MulQuasiMatrix, arguments, Weighted, HalfWeighted, grammatrix
33

44
@testset "Jacobi" begin
55
@testset "JacobiWeight" begin

0 commit comments

Comments
 (0)