irfft2

Contents

irfft2#

class saiunit.fft.irfft2(a, s=None, axes=(-2, -1), norm=None, **kwargs)#

Compute a real-valued two-dimensional inverse DFT.

Unit-aware implementation of numpy.fft.irfft2(). The output unit is input_unit / second ** 2.

Parameters:
  • a (saiunit.Quantity | Array | ndarray | bool | number | bool | int | float | complex) – Input array with a.ndim >= 2.

  • s (Sequence[int] | None) – Shape (length-2) of the output along each axes entry.

  • axes (Sequence[int]) – Axes over which to compute the 2-D real inverse DFT.

  • norm (str | None) – Normalization mode.

Returns:

Real-valued two-dimensional inverse DFT of a.

Return type:

saiunit.Quantity | Array | ndarray | bool | number | bool | int | float | complex

See also

saiunit.fft.rfft2

Two-dimensional real DFT (forward).

saiunit.fft.irfftn

N-dimensional real inverse DFT.

Examples

>>> import saiunit as u
>>> import saiunit.fft as sufft
>>> import jax.numpy as jnp
>>> x = jnp.array([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]) * u.meter
>>> X = sufft.rfft2(x)
>>> x_back = sufft.irfft2(X)