Inverse of Plan Legendre Transform alters input?
Not sure if this is an expected behavior or not, what is the resulting vector?
P = Legendre()
x = chebyshevpoints(Float64, 10, Val(1))
p = plan_transform(P, x, 1)
v = rand(10)
v_copy = copy(v)
p\v
v ≈ v_copy #false
Oh you mean it's mutating the input? That's definitely a bug...
So I've found the issue, that is also related with the speed problems that I was seeing. The legendre transform uses FastTransforms.plan_th_cheb2leg!, and for unexpected issue, FastTransforms.plan_th_cheb2leg is actually 5 times faster.
Ugg... we should be able to replace it with plan_cheb2leg (we needed plan_th_cheb2leg because the plans used to have bad complexity but I believe @MikaelSlevinsky and others have corrected this)
Can I contribute by fixing it?
That would be amazing! @mikaelslevinsky what is needed to use the fast plans?