Skip to content
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

Warn that FFTW.jl must be imported to use FFTESSMethod #13

Closed
sethaxen opened this issue Jun 21, 2021 · 1 comment · Fixed by #14
Closed

Warn that FFTW.jl must be imported to use FFTESSMethod #13

sethaxen opened this issue Jun 21, 2021 · 1 comment · Fixed by #14

Comments

@sethaxen
Copy link
Member

ess_rhat with FFTESSMethod requires methods of AbstractFFTs.plan_fft! and AbstractFFTs.plan_ifft! that are defined in FFTW.jl, so if the user doesn't call using FFTW, they get a very unhelpful message:

julia> x = randn(1000, 10, 4);

julia> ess_rhat(x; method=FFTESSMethod())
ERROR: MethodError: no method matching plan_fft!(::Matrix{ComplexF64}, ::Int64)
Closest candidates are:
  plan_fft!(::AbstractArray; kws...) at /Users/sethaxen/.julia/packages/AbstractFFTs/JebmH/src/definitions.jl:52

It would be better to give the user a more helpful message telling them to load FFTW first.

@devmotion
Copy link
Member

They don't have to use FFTW (it's the main point that you can pick the FFT backend, e.g. you can also use https://github.com/JuliaApproximation/FastTransforms.jl). I agree though that it would be good to document it better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants