tfmri.signal.ifft
tfmri.signal.ifft¶
- ifft(x, shape=None, axes=None, norm='backward', shift=False)[source]¶
Computes the N-dimensional inverse discrete Fourier Transform.
This function computes the inverse of the
N
-dimensional discrete Fourier Transform over any number of axes in an M-dimensional array by means of the Fast Fourier Transform (FFT).Note
N
must be 1, 2 or 3.- Parameters
x – A
Tensor
. Must be one of the following types:complex64
,complex128
.shape – A
Tensor
, aTensorShape
or a list ofints
. Shape (length of each transformed axis) of the output (s[0]
refers to axis 0,s[1]
to axis 1, etc.). Along any axis, if the given shape is smaller than that of the input, the input is cropped. If it is larger, the input is padded with zeros. Ifshape
is not given, the shape of the input along the axes specified byaxes
is used.axes – A
Tensor
or a list ofints
. Axes over which to compute the FFT. If not given, the lastlen(shape)
axes are used, or all axes ifshape
is also not specified.norm – A
string
. The normalization mode. Must be one of"forward"
,"backward"
or"ortho"
. Defaults to"backward"
. Indicates which direction of the forward/backward pair of transforms is scaled and with what normalization factor.shift – A boolean. If True, perform a “centered” transform by appropriately shifting the inputs/outputs (eg, shifting zero-frequency components to the center of the spectrum).
- Returns
The truncated or zero-padded input tensor, transformed along the axes indicated by
axes
, or by a combination ofshape
andaxes
, as explained in the parameters section above.- Raises
TypeError – If
x
is not of a complex type.InvalidArgumentError – If length of
shape
is greater than the rank ofx
.InvalidArgumentError – If length of
axes
is greater than the rank ofx
.InvalidArgumentError – If any element of
axes
is larger than the number of axes ofx
.InvalidArgumentError – If
shape
andaxes
have different length.ValueError – If
norm
is not one of ‘forward’, ‘backward’ or ‘ortho’.