pub fn ifftshift<'a>(
a: impl AsRef<Array>,
axes: impl IntoOption<&'a [i32]>,
) -> Result<Array>Expand description
The inverse of fftshift.
Although identical for even-length x, the functions differ by one sample for odd-length x.
§Params
a: The input array.axes: Axes over which to calculate. The default isNonewhich shifts all axes.
§Example
use mlx_rs::{Array, fft::*};
let a = Array::from_slice(&[-4.0f32, -3.0, -2.0, -1.0, 0.0, 1.0, 2.0, 3.0, 4.0], &[9]);
let unshifted = ifftshift(&a, None).unwrap();
// unshifted contains: [0.0, 1.0, 2.0, 3.0, 4.0, -4.0, -3.0, -2.0, -1.0]