def init_fftw_plan(self, planning_effort='measure', **kwargs):
        """Initialize the FFTW plan for this transform for later use.

        If the implementation of this operator is not 'pyfftw', this
        method should not be called.

        Parameters
        ----------
        planning_effort : str, optional
            Flag for the amount of effort put into finding an optimal
            FFTW plan. See the `FFTW doc on planner flags
            <http://www.fftw.org/fftw3_doc/Planner-Flags.html>`_.
            Options: {'estimate', 'measure', 'patient', 'exhaustive'}
        planning_timelimit : float or ``None``, optional
            Limit planning time to roughly this many seconds.
            Default: ``None`` (no limit)
        threads : int, optional
            Number of threads to use. Default: 1

        Raises
        ------
        ValueError
            If `impl` is not 'pyfftw'

        Notes
        -----
        To save memory, clear the plan when the transform is no longer
        used (the plan stores 2 arrays).

        See Also
        --------
        clear_fftw_plan
        """
        if self.impl != 'pyfftw':
            raise ValueError('cannot create fftw plan without fftw backend')

        # Using available temporaries if possible
        inverse = isinstance(self, FourierTransformInverse)

        if inverse:
            rspace = self.range
            fspace = self.domain
        else:
            rspace = self.domain
            fspace = self.range

        if rspace.field == ComplexNumbers():
            # C2C: Use either one of 'r' or 'f' temporary if initialized
            if self._tmp_r is not None:
                arr_in = arr_out = self._tmp_r
            elif self._tmp_f is not None:
                arr_in = arr_out = self._tmp_f
            else:
                arr_in = arr_out = rspace.element().asarray()

        elif self.halfcomplex:
            # R2HC / HC2R: Use 'r' and 'f' temporary distinctly if initialized
            if self._tmp_r is not None:
                arr_r = self._tmp_r
            else:
                arr_r = rspace.element().asarray()
            if self._tmp_f is not None:
                arr_f = self._tmp_f
            else:
                arr_f = fspace.element().asarray()

            if inverse:
                arr_in, arr_out = arr_f, arr_r
            else:
                arr_in, arr_out = arr_r, arr_f

        else:
            # R2C / C2R: Use 'f' temporary for both sides if initialized
            if self._tmp_f is not None:
                arr_in = arr_out = self._tmp_f
            else:
                arr_in = arr_out = fspace.element().asarray()

        kwargs.pop('planning_timelimit', None)

        direction = 'forward' if self.sign == '-' else 'backward'
        self._fftw_plan = pyfftw_call(
            arr_in, arr_out, direction=direction,
            halfcomplex=self.halfcomplex, axes=self.axes,
            planning_effort=planning_effort, **kwargs)
def init_fftw_plan ( self , planning_effort = 'measure' , ** kwargs ) : if self . impl != 'pyfftw' : raise ValueError ( 'cannot create fftw plan without fftw backend' ) inverse = isinstance ( self , FourierTransformInverse ) if inverse : rspace = self . range fspace = self . domain else : rspace = self . domain fspace = self . range if rspace . field == ComplexNumbers ( ) : if self . _tmp_r is not None : arr_in = arr_out = self . _tmp_r elif self . _tmp_f is not None : arr_in = arr_out = self . _tmp_f else : arr_in = arr_out = rspace . element ( ) . asarray ( ) elif self . halfcomplex : if self . _tmp_r is not None : arr_r = self . _tmp_r else : arr_r = rspace . element ( ) . asarray ( ) if self . _tmp_f is not None : arr_f = self . _tmp_f else : arr_f = fspace . element ( ) . asarray ( ) if inverse : arr_in , arr_out = arr_f , arr_r else : arr_in , arr_out = arr_r , arr_f else : if self . _tmp_f is not None : arr_in = arr_out = self . _tmp_f else : arr_in = arr_out = fspace . element ( ) . asarray ( ) kwargs . pop ( 'planning_timelimit' , None ) direction = 'forward' if self . sign == '-' else 'backward' self . _fftw_plan = pyfftw_call ( arr_in , arr_out , direction = direction , halfcomplex = self . halfcomplex , axes = self . axes , planning_effort = planning_effort , ** kwargs )
Initialize the FFTW plan for this transform for later use.

        If the implementation of this operator is not 'pyfftw', this
        method should not be called.

        Parameters
        ----------
        planning_effort : str, optional
            Flag for the amount of effort put into finding an optimal
            FFTW plan. See the `FFTW doc on planner flags
            <http://www.fftw.org/fftw3_doc/Planner-Flags.html>`_.
            Options: {'estimate', 'measure', 'patient', 'exhaustive'}
        planning_timelimit : float or ``None``, optional
            Limit planning time to roughly this many seconds.
            Default: ``None`` (no limit)
        threads : int, optional
            Number of threads to use. Default: 1

        Raises
        ------
        ValueError
            If `impl` is not 'pyfftw'

        Notes
        -----
        To save memory, clear the plan when the transform is no longer
        used (the plan stores 2 arrays).

        See Also
        --------
        clear_fftw_plan