-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
wand bins patch: fix #479 #480
Conversation
I'd prefer we just used the AbstractFFTs interface. Once one of the packages that implements the interface is loaded, there's no way for the user to switch between them, and the whole point of the interface package is to not coerce the user to a choice. So we can document that to use wand bins, the user should load an FFT package (e.g. FFTW or FastTransforms). And if one of the other packages in their environment already did, then great, it already works. |
Are you sure? That sounds strange, why would the user not be able to choose a different FFT than the one we use internally here? Not really keen on hoisting the dep management manually onto the user. |
Currently only if the user constructs their own FFT plan can they coerce the backend. The
I think this is standard for FFT though. I'll look into it some more. |
So the FFTW dep is a bit strange to me - this functionality obviously worked when it was added, so |
We depend on KernelDensity for the smooth density plots, and they load FFTW (see here), so even if we get the function from AbstractFFT (which I guess we might), there will already be the FFTW backend loaded due to KernelDensity. I personally would also prefer it if KernelDensity was FFTW backend agnostic (due to the MKL dependency of FFTW.jl), but
|
According to the AbstractFFTs docs, it used to be in the stdlib for Julia 0.6 and earlier. StatsPlots dropped support for v0.6 in v0.8.0. Wand bins were added in v0.5.0. |
Ah okay, well that then makes this discussion moot. But I would prefer to just depend on AbstractFFTs directly then. |
@sethaxen I understand your concern as it seems we are adding a new binary dep, but actually KernelDensity here already depends directly on FFTW, so there is no difference in terms of footprint. If you prefer, I can do EDIT: Ah sorry, just saw now that @piever noted the same thing above before I typed |
@sethaxen alright, I've updated the dep to AbstractFFTs. Seems to work perfectly. I also added a test that isn't numerically precise (because one shouldn't assume random numbers in tests) but just sees if the function runs essentially. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few minor changes
Co-authored-by: Seth Axen <[email protected]>
Co-authored-by: Seth Axen <[email protected]>
Co-authored-by: Seth Axen <[email protected]>
Co-authored-by: Seth Axen <[email protected]>
Changed as requested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Seemed generally bitrotted. Missing a dep for the FFT, the pdf function was changed in Distributions long ago. For wand bins to actually work also requires JuliaPlots/Plots.jl#4076 in Plots (version XX)