def METHOD_NAME(N, dtype=np.float64):
    Z = np.random.rand(N).astype(dtype)
    Z_num = num.array(Z)
    all_kwargs = (
        {},
        {"norm": "forward"},
        {"n": N // 2},
        {"n": N // 2 + 1},
        {"n": N * 2},
        {"n": N * 2 + 1},
    )
    for kwargs in all_kwargs:
        print(f"=== 1D R2C {dtype}, args: {kwargs} ===")
        out = np.fft.rfft(Z, **kwargs)
        out_num = num.fft.rfft(Z_num, **kwargs)
        assert allclose(out, out_num)
    # Odd types
    out = np.fft.irfft(Z)
    out_num = num.fft.irfft(Z_num)
    assert allclose(out, out_num)
    out = np.fft.hfft(Z)
    out_num = num.fft.hfft(Z_num)
    assert allclose(out, out_num)
    assert allclose(Z, Z_num)