dpnp.fft.ifft
- dpnp.fft.ifft(a, n=None, axis=-1, norm=None, out=None)[source]
Compute the one-dimensional inverse discrete Fourier Transform.
For full documentation refer to
numpy.fft.ifft
.- Parameters:
a ({dpnp.ndarray, usm_ndarray}) -- Input array, can be complex.
n ({None, int}, optional) -- Length of the transformed axis of the output. If n is smaller than the length of the input, the input is cropped. If it is larger, the input is padded with zeros. If n is not given, the length of the input along the axis specified by axis is used. Default:
None
.axis (int, optional) -- Axis over which to compute the inverse FFT. If not given, the last axis is used. Default:
-1
.norm ({"backward", "ortho", "forward"}, optional) -- Normalization mode (see
dpnp.fft
). Indicates which direction of the forward/backward pair of transforms is scaled and with what normalization factor.None
is an alias of the default option"backward"
. Default:"backward"
.out ({None, dpnp.ndarray or usm_ndarray of complex dtype}, optional) -- If provided, the result will be placed in this array. It should be of the appropriate shape and dtype. Default:
None
.
- Returns:
out -- The truncated or zero-padded input, transformed along the axis indicated by axis, or the last one if axis is not specified.
- Return type:
dpnp.ndarray of complex dtype
See also
dpnp.fft
For definition of the DFT and conventions used.
dpnp.fft.fft
The one-dimensional (forward) FFT, of which
dpnp.fft.ifft
is the inverse.dpnp.fft.ifft2
The two-dimensional inverse FFT.
dpnp.fft.ifftn
The n-dimensional inverse FFT.
Notes
If the input parameter n is larger than the size of the input, the input is padded by appending zeros at the end. Even though this is the common approach, it might lead to surprising results. If a different padding is desired, it must be performed before calling
dpnp.fft.ifft
.Examples
>>> import dpnp as np >>> a = np.array([0, 4, 0, 0]) >>> np.fft.ifft(a) array([ 1.+0.j, 0.+1.j, -1.+0.j, 0.-1.j]) # may vary