def test_resample_regressor_nl(): """ test regressor resampling on a sine function """ x = np.linspace(0, 10, 1000) y = np.linspace(0, 10, 30) z = _resample_regressor(np.cos(x), x, y) assert_almost_equal(z, np.cos(y), decimal=2)
def test_resample_regressor_nl(): """ test regressor resampling on a sine function """ x = np.linspace(0, 10, 1000) y = np.linspace(0, 10, 30) z = _resample_regressor(np.cos(x), x, y) assert_almost_equal(z, np.cos(y), decimal=2)
def test_resample_regressor(): """ test regressor resampling on a linear function """ x = np.linspace(0, 1, 200) y = np.linspace(0, 1, 30) z = _resample_regressor(x, x, y) assert_almost_equal(z, y)
def test_resample_regressor(): """ test regressor resampling on a linear function """ x = np.linspace(0, 1, 200) y = np.linspace(0, 1, 30) z = _resample_regressor(x, x, y) assert_almost_equal(z, y)