jax.numpy.fft.ihfft
Contents
jax.numpy.fft.ihfft#
- jax.numpy.fft.ihfft(a,n=None,axis=-1,norm=None)[source]#
Compute a 1-D inverse FFT of an array whose spectrum has Hermitian-symmetry.
JAX implementation of
numpy.fft.ihfft().- Parameters:
a (ArrayLike) – input array.
n (int |None) – optional, int. Specifies the effective dimension of the input along
axis.If not specified, it will default to the dimension of input alongaxis.axis (int) – optional, int, default=-1. Specifies the axis along which the transformis computed. If not specified, the transform is computed along axis -1.
norm (str |None) – optional, string. The normalization mode. “backward”, “ortho” and “forward”are supported. Default is “backward”.
- Returns:
An array containing one-dimensional discrete Fourier transform of
abyexploiting its inherent Hermitian symmetry. The dimension of the array alongaxisis(n/2)+1, ifnis even and(n+1)/2, ifnis odd.- Return type:
See also
jax.numpy.fft.hfft(): Computes a one-dimensional FFT of an arraywhose spectrum has Hermitian symmetry.jax.numpy.fft.fft(): Computes a one-dimensional discrete Fouriertransform.jax.numpy.fft.rfft(): Computes a one-dimensional discrete Fouriertransform of a real-valued input.
Examples
>>>x=jnp.array([[1,3,5,7],...[2,4,6,8]])>>>jnp.fft.ihfft(x)Array([[ 4.+0.j, -1.-1.j, -1.-0.j], [ 5.+0.j, -1.-1.j, -1.-0.j]], dtype=complex64)
When
n=4andaxis=0, dimension of the transform alongaxis0willbe(4/2)+1=3and dimension along other axes will be same as that of input.>>>jnp.fft.ihfft(x,n=4,axis=0)Array([[ 0.75+0.j , 1.75+0.j , 2.75+0.j , 3.75+0.j ], [ 0.25+0.5j, 0.75+1.j , 1.25+1.5j, 1.75+2.j ], [-0.25-0.j , -0.25-0.j , -0.25-0.j , -0.25-0.j ]], dtype=complex64)
