Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K
JAX  documentation - Home

jax.numpy.fft.ifft

Contents

jax.numpy.fft.ifft#

jax.numpy.fft.ifft(a,n=None,axis=-1,norm=None)[source]#

Compute a one-dimensional inverse discrete Fourier transform.

JAX implementation ofnumpy.fft.ifft().

Parameters:
  • a (ArrayLike) – input array

  • n (int |None) – int. Specifies the dimension of the result alongaxis. If not specified,it will default to the dimension ofa alongaxis.

  • axis (int) – int, default=-1. Specifies the axis along which the transform is computed.If not specified, the transform is computed along axis -1.

  • norm (str |None) – string. The normalization mode. “backward”, “ortho” and “forward” aresupported.

Returns:

An array containing the one-dimensional discrete Fourier transform ofa.

Return type:

Array

See also

Examples

jnp.fft.ifft computes the transform alongaxis-1 by default.

>>>x=jnp.array([[3,1,4,6],...[2,5,7,1]])>>>jnp.fft.ifft(x)Array([[ 3.5 +0.j  , -0.25-1.25j,  0.  +0.j  , -0.25+1.25j],      [ 3.75+0.j  , -1.25+1.j  ,  0.75+0.j  , -1.25-1.j  ]],      dtype=complex64)

Whenn=5, dimension of the transform along axis -1 will be5 anddimension along other axes will be the same as that of input.

>>>withjnp.printoptions(precision=2,suppress=True):...print(jnp.fft.ifft(x,n=5))[[ 2.8 +0.j   -0.96-0.04j  1.06+0.5j   1.06-0.5j  -0.96+0.04j] [ 3.  +0.j   -0.59+1.66j  0.09-0.55j  0.09+0.55j -0.59-1.66j]]

Whenn=3 andaxis=0, dimension of the transform alongaxis0 willbe3 and dimension along other axes will be same as that of input.

>>>withjnp.printoptions(precision=2,suppress=True):...print(jnp.fft.ifft(x,n=3,axis=0))[[ 1.67+0.j    2.  +0.j    3.67+0.j    2.33+0.j  ] [ 0.67+0.58j -0.5 +1.44j  0.17+2.02j  1.83+0.29j] [ 0.67-0.58j -0.5 -1.44j  0.17-2.02j  1.83-0.29j]]
Contents

[8]ページ先頭

©2009-2025 Movatter.jp