python - How to use PyFFTW's wisom -


i didn't see actual example on pyfftw's documentation of how use 'wisdom' feature i'm little confused.

my code looks following:

# first fft input = pyfftw.zeros_aligned(arraysize, dtype='complex64') input[:] = image fftwobj = pyfftw.builders.fft2(input, planner_effort='fftw_exhaustive') imagefft = fftwobj(input)  wisdom = pyfftw.export_wisdom()  pyfftw.import_wisdom(wisdom)  # second fft same input size different input input = pyfftw.zeros_aligned(arraysize, dtype='complex64') input[:] = image2 fftwobj = pyfftw.builders.fft2(input, planner_effort='fftw_exhaustive') imagefft2 = fftwobj(input) 

the docs export_wisdom outputs tuple of strings , import_wisdom takes in tuple argument.

when supposed export wisdom , supposed save tuple out file each fft?

when load in? before call each fft?

basically, exporting , importing wisdom method maintain state between sessions.

the wisdom knowledge how best plan fft. during session, internal "wisdom" made of plans made, , wisdom has been imported. repeatedly importing same wisdom file not useful because knowledge known after first import.

you export wisdom when want knowledge particular transform plan used instead of having work out again. need plan transform once per session though.


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -