if np.isreal(vals).all():
        coeffs = ifft(tmp)
        coeffs = np.real(coeffs)
    elif np.isreal(1j * vals).all():
        coeffs = ifft(np.imag(tmp))