Skip to content

Commit 51c42b3

Browse files
authored
Test that diff(T[:,1:5]) * randn(5) returns an Expansion instead of a… (#200)
* Test that diff(T[:,1:5]) * randn(5) returns an Expansion instead of a lazy multiplication * Update Project.toml * Update test_chebyshev.jl
1 parent 3dbb5db commit 51c42b3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ HypergeometricFunctions = "0.3.4"
3939
InfiniteArrays = " 0.14"
4040
InfiniteLinearAlgebra = "0.8"
4141
IntervalSets = "0.7"
42-
LazyArrays = "2.0.3"
42+
LazyArrays = "2.2"
4343
LazyBandedMatrices = "0.10"
4444
QuasiArrays = "0.11"
4545
SpecialFunctions = "1.0, 2"

test/test_chebyshev.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import ClassicalOrthogonalPolynomials: Clenshaw, recurrencecoefficients, clensha
55
import LazyArrays: ApplyStyle
66
import QuasiArrays: MulQuasiMatrix
77
import Base: OneTo
8-
import ContinuumArrays: MappedWeightedBasisLayout, Map, WeightedBasisLayout
8+
import ContinuumArrays: MappedWeightedBasisLayout, Map, WeightedBasisLayout, ExpansionLayout
99
import BandedMatrices: isbanded
1010

1111
@testset "Chebyshev" begin
@@ -578,6 +578,10 @@ import BandedMatrices: isbanded
578578
@test T \ exp.(im*x) transform(T, x -> exp(im*x))
579579
@test expand(T, x -> exp(im*x))[0.1] exp(im*0.1)
580580
end
581+
582+
@testset "diff of truncation" begin
583+
MemoryLayout(diff(ChebyshevT()[:,1:5]) * randn(5)) isa ExpansionLayout
584+
end
581585
end
582586

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

0 commit comments

Comments
 (0)