Swift vDSP rFFT not same as Python np.fft.rfft()
Sanity check your data layouts.
It is very common for FFT libraries to pack the (real-valued) Nyquist-bin into the unused imaginary component of the DC-bin and it happens almost naturally when you implement a real-transform as a half-size complex-transform.
As far as I can tell, vDSP wants such &quot;packed&quot; layout, where as Python apparently stores it as a separate &quot;unpacked&quot; real-component in a larger array.