jax.numpy.fft.ifftshift
Contents
jax.numpy.fft.ifftshift#
- jax.numpy.fft.ifftshift(x,axes=None)[source]#
The inverse of
jax.numpy.fft.fftshift().JAX implementation of
numpy.fft.ifftshift().- Parameters:
- Returns:
A shifted copy of
x.- Return type:
See also
jax.numpy.fft.fftshift(): inverse ofifftshift.jax.numpy.fft.fftfreq(): generate FFT frequencies.
Examples
Generate FFT frequencies with
fftfreq():>>>freq=jnp.fft.fftfreq(5)>>>freqArray([ 0. , 0.2, 0.4, -0.4, -0.2], dtype=float32)
Use
fftshift()to shift the zero-frequency entryto the middle of the array:>>>shifted_freq=jnp.fft.fftshift(freq)>>>shifted_freqArray([-0.4, -0.2, 0. , 0.2, 0.4], dtype=float32)
Unshift with
ifftshiftto recover the original frequencies:>>>jnp.fft.ifftshift(shifted_freq)Array([ 0. , 0.2, 0.4, -0.4, -0.2], dtype=float32)
Contents
