ClassicalOrthogonalPolynomials.jl icon indicating copy to clipboard operation
ClassicalOrthogonalPolynomials.jl copied to clipboard

ForwardDiff with plan transform fails

Open Veenty opened this issue 8 months ago • 1 comments

So I suspect this is an expected behavior, but not sure how to get around it though

using ClassicalOrthogonalPolynomials
using ForwardDiff

x = chebyshevpoints(Float64, 100, Val(1))
p = plan_transform(Legendre(), x, 1)
T = x-> p*x
JG = ForwardDiff.jacobian(T, x) #error

spits out

ERROR: MethodError: no method matching Float64(::ForwardDiff.Dual{ForwardDiff.Tag{var"#15#16", Float64}, Float64, 10})
The type `Float64` exists, but no method is defined for this combination of argument types when trying to construct it.

Veenty avatar Apr 02 '25 13:04 Veenty

Probably needs: https://github.com/JuliaMath/AbstractFFTs.jl/pull/138

dlfivefifty avatar Apr 02 '25 18:04 dlfivefifty