A set of utility functions for use with the builders. Users should not need to use the functions directly, but they are included here for completeness and to aid with understanding of what is happening behind the scenes.
Certainly, users may encounter instances of _FFTWWrapper.
These everything documented in this module is not part of the public API and may change in future versions.
The arguments are as per pyfftw.FFTW, but with the addition of 2 keyword arguments: input_array_slicer and FFTW_array_slicer.
These arguments represent 2 slicers: input_array_slicer slices the input array that is passed in during a call to instances of this class, and FFTW_array_slicer slices the internal array.
The arrays that are returned from both of these slicing operations should be the same size. The data is then copied from the sliced input array into the sliced internal array.
Wrap pyfftw.FFTW.__call__() by firstly slicing the passed-in input array and then copying it into a sliced version of the internal array. These slicers are set at instantiation.
When input array is not None, this method always results in a copy. Consequently, the alignment and dtype are maintained in the internal array.
output_array and normalise_idft are passed through to pyfftw.FFTW.__call__() untouched.
Generic transform interface for all the transforms. No defaults exist. The transform must be specified exactly.
This function returns two slicers that are to be used to copy the data from the input array to the FFTW object internal array, which can then be passed to _FFTWWrapper:
On calls to _FFTWWrapper objects, the input array is copied in as:
FFTW_array[FFTW_array_slicer] = input_array[update_input_array_slicer]
Given a passed in array a, and the rest of the arguments (that have been fleshed out with _cook_nd_args()), compute the shape the input and output arrays need to be in order to satisfy all the requirements for the transform. The input shape may be different to the shape of a.
returns: (input_shape, output_shape)
Turn *(n, axis) into (s, axes)
Similar to numpy.fft.fftpack._cook_nd_args().