From 8ccceb16ef963091def7c3b4a647d34557015cb5 Mon Sep 17 00:00:00 2001 From: Kevin Sheppard Date: Sun, 2 Feb 2020 12:13:59 +0000 Subject: [PATCH] CLN: Finaly typing Finaly typing fixes --- arch/tests/bootstrap/test_bootstrap.py | 2 +- arch/tests/univariate/test_forecast.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/tests/bootstrap/test_bootstrap.py b/arch/tests/bootstrap/test_bootstrap.py index ad382fdde2..7ba951399e 100644 --- a/arch/tests/bootstrap/test_bootstrap.py +++ b/arch/tests/bootstrap/test_bootstrap.py @@ -598,7 +598,7 @@ def test_pandas_integer_index(bs_setup): bs = IIDBootstrap(x, x_int) bs.seed(23456) for pdata, _ in bs.bootstrap(10): - assert_equal(pdata[0], pdata[1].values) + assert_equal(pdata[0], np.asarray(pdata[1])) def test_apply(bs_setup): diff --git a/arch/tests/univariate/test_forecast.py b/arch/tests/univariate/test_forecast.py index 26db922d81..f1964e4e91 100644 --- a/arch/tests/univariate/test_forecast.py +++ b/arch/tests/univariate/test_forecast.py @@ -230,12 +230,12 @@ def test_ar2_forecast(self): fill = np.empty((1, 5)) fill.fill(np.nan) expected = np.concatenate((fill, expected[:, 2:])) - assert_allclose(fcast.mean.values, expected) + assert_allclose(np.asarray(fcast.mean), expected) expected = np.empty((1000, 5)) expected[:2] = np.nan expected[2:] = res.params.iloc[-1] - assert_allclose(fcast.residual_variance.values, expected) + assert_allclose(np.asarray(fcast.residual_variance), expected) with pytest.raises(ValueError): res.forecast(horizon=5, start=0) @@ -530,7 +530,7 @@ def test_forecast_exogenous_regressors(self): direct = const + har01 * y_01 + har02 * y_02 + ex0 * x0 + ex1 * x1 direct = np.vstack(([[np.nan]], direct, [[np.nan]])) direct = pd.DataFrame(direct, columns=["h.1"]) - assert_allclose(direct.values, fcasts.mean) + assert_allclose(np.asarray(direct), fcasts.mean) fcasts2 = res.forecast(horizon=2, start=1) assert fcasts2.mean.shape == (1000, 2)