jax.numpy.fft.ifft2
Contents
jax.numpy.fft.ifft2#
- jax.numpy.fft.ifft2(a,s=None,axes=(-2,-1),norm=None)[source]#
Compute a two-dimensional inverse discrete Fourier transform.
JAX implementation of
numpy.fft.ifft2().- Parameters:
a (ArrayLike) – input array. Must have
a.ndim>=2.s (Shape |None) – optional length-2 sequence of integers. Specifies the size of the outputin each specified axis. If not specified, it will default to the size of
aalong the specifiedaxes.axes (Sequence[int]) – optional length-2 sequence of integers, default=(-2,-1). Specifies theaxes along which the transform is computed.
norm (str |None) – string, default=”backward”. The normalization mode. “backward”, “ortho”and “forward” are supported.
- Returns:
An array containing the two-dimensional inverse discrete Fourier transformof
aalong givenaxes.- Return type:
See also
jax.numpy.fft.ifft(): Computes a one-dimensional inverse discreteFourier transform.jax.numpy.fft.ifftn(): Computes a multidimensional inverse discreteFourier transform.jax.numpy.fft.fft2(): Computes a two-dimensional discrete Fouriertransform.
Examples
jnp.fft.ifft2computes the transform along the last two axes by default.>>>x=jnp.array([[[1,3],...[2,4]],...[[5,7],...[6,8]]])>>>withjnp.printoptions(precision=2,suppress=True):...jnp.fft.ifft2(x)Array([[[ 2.5+0.j, -1. +0.j], [-0.5+0.j, 0. +0.j]], [[ 6.5+0.j, -1. +0.j], [-0.5+0.j, 0. +0.j]]], dtype=complex64)
When
s=[2,3], dimension of the transform alongaxes(-2,-1)will be(2,3)and dimension along other axes will be the same as that of input.>>>withjnp.printoptions(precision=2,suppress=True):...jnp.fft.ifft2(x,s=[2,3])Array([[[ 1.67+0.j , -0.08+1.01j, -0.08-1.01j], [-0.33+0.j , -0.08-0.14j, -0.08+0.14j]], [[ 4.33+0.j , 0.58+2.17j, 0.58-2.17j], [-0.33+0.j , -0.08-0.14j, -0.08+0.14j]]], dtype=complex64)
When
s=[2,3]andaxes=(0,1), shape of the transform alongaxes(0,1)will be(2,3)and dimension along other axes will besame as that of input.>>>withjnp.printoptions(precision=2,suppress=True):...jnp.fft.ifft2(x,s=[2,3],axes=(0,1))Array([[[ 2.33+0.j , 3.67+0.j ], [ 0.33+1.15j, 0.67+1.73j], [ 0.33-1.15j, 0.67-1.73j]], [[-1.33+0.j , -1.33+0.j ], [-0.33-0.58j, -0.33-0.58j], [-0.33+0.58j, -0.33+0.58j]]], dtype=complex64)
