-
Notifications
You must be signed in to change notification settings - Fork 27
Make chebyshev transforms type stable, make points lazy #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #114 +/- ##
==========================================
+ Coverage 79.25% 81.02% +1.76%
==========================================
Files 13 13
Lines 1417 1449 +32
==========================================
+ Hits 1123 1174 +51
+ Misses 294 275 -19
Continue to review full report at Codecov.
|
@MikaelSlevinsky Any opinions? I decided to make the code type-stable, mostly because the Julia compiler is a lot faster when it doesn't need to deal with un-inferred code. So this will help down-stream packages compile time. I also removed support for transforming empty vectors, or for just single-point Chebyshev of the 2nd kind. I'm not sure if the latter is actually used anywhere anymore. For empty vectors, this can probably be done with an extra check in ApproxFun. There are alternative ways to work around this if we decide empty vectors is important to support. |
How is it an improvement to remove the empty array checking? Some folks might be using the points/transforms for modified moment-based quadrature independent of JuliaApproximation. If we don’t want the execution case, then maybe put an assertion in the plan creation? |
For the 1st kind transforms: its not an improvement, but is because FFTW throws errors iwth empty arrays julia> dct(Float64[])
ERROR: FFTW could not create plan So then we can't create a plan. This gives the following options:
isnothing(F.plan) ? copy(x) : something(F.plan) * copy(x) But it slightly complicates things. !isdefined(F, :plan) ? copy(x) : F.plan * copy(x)
Any preference between the 4 options? For the 2nd kind transform, I don't think we want it the check on |
This assertion already happens in FFTW. |
Ok you can decide. (I won’t be able to merge this week.) |
No description provided.