Hi @dlfivefifty
I am using ApproxFun.jl along with Num
type from SYmbolics to work with sin/cosine/Fourier
series as follows:
julia> myg =Fun(CosSpace(), rand(10));
myf = Fun(SinSpace(), rand(10));
using Symbolics
a=Symbolics.variables(:a, 0:9); # create a Num vector
myh = Fun(Fourier(), a);
myg*myf; # this works
myg*myh # this doesnt work
myf*myh # this also doesnt work
Both cases that dont work throw following error, If someone can help me here ?
ERROR: TypeError: non-boolean (Num) used in boolean context
Stacktrace:
[1] standardchoplength(coeffs::Vector{Num}, tol::Num)
@ ApproxFunBase ~/.julia/packages/ApproxFunBase/OfsLT/src/LinearAlgebra/standardchop.jl:46
[2] chop!
@ ~/.julia/packages/ApproxFunBase/OfsLT/src/Fun.jl:494 [inlined]
[3] chop!
@ ~/.julia/packages/ApproxFunBase/OfsLT/src/Fun.jl:503 [inlined]
[4] chop(f::Fun{CosSpace{PeriodicSegment{Float64}, Float64}, Num, SubArray{Num, 1, Vector{Num}, Tuple{StepRange{Int64, Int64}}, true}}, tol::Num)
@ ApproxFunBase ~/.julia/packages/ApproxFunBase/OfsLT/src/Fun.jl:521
[5] ConcreteMultiplication
@ ~/.julia/packages/ApproxFunBase/OfsLT/src/Operators/banded/Multiplication.jl:16 [inlined]
[6] ConcreteMultiplication
@ ~/.julia/packages/ApproxFunBase/OfsLT/src/Operators/banded/Multiplication.jl:26 [inlined]
[7] Multiplication(f::Fun{SS}, sp::CosSpace) where SS<:SinSpace
@ ApproxFunFourier ~/.julia/packages/ApproxFunFourier/a7eyk/src/FourierOperators.jl:218 [inlined]
[8] coefficienttimes(f::Fun{CosSpace{…}, Num, SubArray{…}}, g::Fun{CosSpace{…}, Float64, Vector{…}})
@ ApproxFunBase ~/.julia/packages/ApproxFunBase/OfsLT/src/Operators/banded/Multiplication.jl:166
[9] default_mult_compatible(f::Fun{CosSpace{…}, Float64, Vector{…}}, g::Fun{CosSpace{…}, Num, SubArray{…}})
@ ApproxFunBase ~/.julia/packages/ApproxFunBase/OfsLT/src/Operators/banded/Multiplication.jl:148
[10] default_mult(f::Fun{CosSpace{…}, Float64, Vector{…}}, g::Fun{CosSpace{…}, Num, SubArray{…}})
@ ApproxFunBase ~/.julia/packages/ApproxFunBase/OfsLT/src/Operators/banded/Multiplication.jl:155
[11] *(f::Fun{CosSpace{…}, Float64, Vector{…}}, g::Fun{CosSpace{…}, Num, SubArray{…}})
@ ApproxFunBase ~/.julia/packages/ApproxFunBase/OfsLT/src/Operators/banded/Multiplication.jl:164
[12] (::ApproxFunBase.var"#527#528"{Fun{CosSpace{PeriodicSegment{Float64}, Float64}, Float64, Vector{Float64}}})(gg::Function)
@ ApproxFunBase ~/.julia/packages/ApproxFunBase/OfsLT/src/Spaces/ProductSpaceOperators.jl:323
[13] _mapreduce(f::ApproxFunBase.var"#527#528"{Fun{CosSpace{…}, Float64, Vector{…}}}, op::typeof(+), ::IndexLinear, A::Vector{Fun{S, Num, SubArray{…}} where S})
@ Base ./reduce.jl:440
[14] _mapreduce_dim
@ ./reducedim.jl:365 [inlined]
[15] mapreduce(f::Any, op::Any, A::Union{Base.AbstractBroadcasted, AbstractArray})
@ Base ./reducedim.jl:357 [inlined]
[16] coefficienttimes
@ ApproxFunBase ~/.julia/packages/ApproxFunBase/OfsLT/src/Spaces/ProductSpaceOperators.jl:323 [inlined]
[17] default_mult_compatible(f::Fun{CosSpace{…}, Float64, Vector{…}}, g::Fun{ApproxFunBase.SumSpace{…}, Num, Vector{…}})
@ ApproxFunBase ~/.julia/packages/ApproxFunBase/OfsLT/src/Operators/banded/Multiplication.jl:146
[18] default_mult(f::Fun{CosSpace{…}, Float64, Vector{…}}, g::Fun{ApproxFunBase.SumSpace{…}, Num, Vector{…}})
@ ApproxFunBase ~/.julia/packages/ApproxFunBase/OfsLT/src/Operators/banded/Multiplication.jl:155
[19] *(f::Fun{CosSpace{PeriodicSegment{…}, Float64}, Float64, Vector{Float64}}, g::Fun{ApproxFunBase.SumSpace{Tuple{…}, PeriodicSegment{…}, Float64}, Num, Vector{Num}})
@ ApproxFunBase ~/.julia/packages/ApproxFunBase/OfsLT/src/Operators/banded/Multiplication.jl:164
[20] top-level scope
@ REPL[55]:1
Some type information was truncated. Use `show(err)` to see complete types.