Skip to content

Commit

Permalink
Fix #139 (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlfivefifty authored Jul 9, 2024
1 parent bed20a3 commit 53244ac
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ArrayLayouts = "1.3.1"
BandedMatrices = "1"
BlockArrays = "1"
BlockBandedMatrices = "0.13"
ContinuumArrays = "0.18"
ContinuumArrays = "0.18.3"
DomainSets = "0.6, 0.7"
FFTW = "1.1"
FastGaussQuadrature = "1"
Expand Down
17 changes: 13 additions & 4 deletions test/test_chebyshev.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using ClassicalOrthogonalPolynomials, QuasiArrays, ContinuumArrays, BandedMatrices, LazyArrays,
FastTransforms, ArrayLayouts, Test, FillArrays, Base64, BlockArrays, LazyBandedMatrices, ForwardDiff
FastTransforms, ArrayLayouts, Test, FillArrays, Base64, BlockArrays, LazyBandedMatrices
using ForwardDiff
import ClassicalOrthogonalPolynomials: Clenshaw, recurrencecoefficients, clenshaw, paddeddata, jacobimatrix, oneto, Weighted, MappedOPLayout
import LazyArrays: ApplyStyle
import QuasiArrays: MulQuasiMatrix
Expand Down Expand Up @@ -104,7 +105,7 @@ import BandedMatrices: isbanded
@testset "ChebyshevU" begin
U = ChebyshevU()
@test U == chebyshevu()
@test U  ChebyshevT()
@test U ChebyshevT()
x = axes(U,1)
F = factorize(U[:,oneto(5)])
@test @inferred(F \ x) [0,0.5,0,0,0]
Expand Down Expand Up @@ -261,7 +262,7 @@ import BandedMatrices: isbanded

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

Expand Down Expand Up @@ -364,7 +365,7 @@ import BandedMatrices: isbanded
@test Chebyshev() == ChebyshevT() == ChebyshevT{Float32}()
@test ChebyshevU() == ChebyshevU{Float32}()
@test Chebyshev{3}() == Chebyshev{3,Float32}()
@test Chebyshev()  ChebyshevU()
@test Chebyshev() ChebyshevU()
end

@testset "sum" begin
Expand Down Expand Up @@ -569,6 +570,14 @@ import BandedMatrices: isbanded
A = T \ (a.(x, 0.) .* T)
@test iszero(A[1,1])
end

@testset "complex rhs (#139)" begin
T = Chebyshev()
x = axes(T,1)
@test T[:,OneTo(5)] \ exp.(im*x) == T[:,1:5] \ exp.(im*x) == ChebyshevT{ComplexF64}()[:,1:5] \ exp.(im*x)
@test T \ exp.(im*x) transform(T, x -> exp(im*x))
@test expand(T, x -> exp(im*x))[0.1] exp(im*0.1)
end
end

struct QuadraticMap{T} <: Map{T} end
Expand Down
2 changes: 1 addition & 1 deletion test/test_jacobi.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using ClassicalOrthogonalPolynomials, FillArrays, BandedMatrices, ContinuumArrays, QuasiArrays, LazyArrays, LazyBandedMatrices, FastGaussQuadrature, Test
import ClassicalOrthogonalPolynomials: recurrencecoefficients, basis, MulQuasiMatrix, arguments, Weighted, HalfWeighted
import ClassicalOrthogonalPolynomials: recurrencecoefficients, basis, MulQuasiMatrix, arguments, Weighted, HalfWeighted, grammatrix

@testset "Jacobi" begin
@testset "JacobiWeight" begin
Expand Down

2 comments on commit 53244ac

@dlfivefifty
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/110741

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.13.3 -m "<description of version>" 53244ac9aeba074161eb5c1c69fb5d0622074892
git push origin v0.13.3

Please sign in to comment.