The following code is running correctly on my machine
using LinearAlgebra
using ApproxFun
Af = Fun(t -> [0 1; -10*cos(t) -24-10*sin(t)],Fourier(0..2π));
D = Derivative(domain(Af));
ND = [D 0I; 0I D];
Aop = Af - ND;
NA = 322
RW = Aop[1:NA,1:NA]
resulting in a matrix as below
322×322 ApproxFunBase.RaggedMatrix{Float64}:
0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 … 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 1.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
5.76141e-16 -6.6615e-16 -24.0 -5.0 -5.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
-1.3323e-15 5.76141e-16 -10.0 -24.0 0.0 -5.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
0.0 -1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
⋮ ⋮ ⋱ ⋮ ⋮
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -79.0 5.76141e-16 -6.6615e-16 -24.0 -5.0 -5.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 -5.0 0.0 0.0 -6.6615e-16 5.76141e-16 -5.0 -24.0 0.0 -5.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 … 0.0 0.0 0.0 0.0 -80.0 0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
However, the same sequence fails on the Ubuntu_latest and Windows_latest CI test environments with both Julia 1.7.2 and Julia 1.8.0 with the following error message
ERROR: LoadError: MethodError: no method matching blocks(::ApproxFunBase.InterlaceOperator{Float64, 2, ApproxFunBase.ArraySpace{ApproxFunBase.SumSpace{Tuple{ApproxFunFourier.CosSpace{ApproxFunFourier.PeriodicSegment{Float64}, Float64}, ApproxFunFourier.SinSpace{ApproxFunFourier.PeriodicSegment{Float64}, Float64}}, ApproxFunFourier.PeriodicSegment{Float64}, Float64}, 1, ApproxFunFourier.PeriodicSegment{Float64}, Float64}, ApproxFunBase.ArraySpace{ApproxFunBase.SumSpace{Tuple{ApproxFunFourier.CosSpace{ApproxFunFourier.PeriodicSegment{Float64}, Float64}, ApproxFunFourier.SinSpace{ApproxFunFourier.PeriodicSegment{Float64}, Float64}}, ApproxFunFourier.PeriodicSegment{Float64}, Float64}, 1, ApproxFunFourier.PeriodicSegment{Float64}, Float64}, ApproxFunBase.CachedIterator{Tuple{Int64, Int64}, ApproxFunBase.BlockInterlacer{Tuple{FillArrays.Fill{Int64, 1, Tuple{InfiniteArrays.OneToInf{Int64}}}, FillArrays.Fill{Int64, 1, Tuple{InfiniteArrays.OneToInf{Int64}}}}}}, ApproxFunBase.CachedIterator{Tuple{Int64, Int64}, ApproxFunBase.BlockInterlacer{Tuple{FillArrays.Fill{Int64, 1, Tuple{InfiniteArrays.OneToInf{Int64}}}, FillArrays.Fill{Int64, 1, Tuple{InfiniteArrays.OneToInf{Int64}}}}}}, Tuple{Infinities.RealInfinity, Infinities.InfiniteCardinal{0}}})
(see run information here)
I would appreciate any hint how to manage to run the tests without this error.
Additional information:
julia> versioninfo()
Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
Environment:
JULIA_EDITOR = code
JULIA_NUM_THREADS =
(@v1.7) pkg> status ApproxFun
Status `C:\Users\Andreas\.julia\environments\v1.7\Project.toml`
[28f2ccd6] ApproxFun v0.13.1
(@v1.7) pkg> status ApproxFunBase
Status `C:\Users\Andreas\.julia\environments\v1.7\Project.toml`
[fbd15aa5] ApproxFunBase v0.5.5