def test_extirpolate():
    rng = np.random.RandomState(0)
    x = 100 * rng.rand(50)
    y = np.sin(x)
    f = lambda x: np.sin(10 / x)

    def check_result(N, M=5):
        y_hat = extirpolate(x, y, N, M)
        x_hat = np.arange(len(y_hat))
        assert_allclose(np.dot(f(x), y), np.dot(f(x_hat), y_hat))

    for N in [100, None]:
        yield check_result, N
dataset/ETHPy150Open astroML/gatspy/gatspy/periodic/tests/test_lomb_scargle_fast.py/test_extirpolate/swapped operands of `/`