BUG: Yule walker cast to float #1975

Merged
merged 2 commits into from Sep 20, 2014

Projects

None yet

2 participants

@jseabold
Member

see #1869

@josef-pkt josef-pkt commented on the diff Sep 20, 2014
statsmodels/tsa/tests/test_tsa_tools.py
@@ -50,6 +50,14 @@ def test_ywcoef():
assert_array_almost_equal(mlywar.arcoef1000[1:],
-sm.regression.yule_walker(x1000, 20, method='mle')[0], 8)
+
+def test_yule_walker_inter():
+ # see 1869
+ x = np.array([1, -1, 2, 2, 0, -2, 1, 0, -3, 0, 0])
+ # it works
+ result = sm.regresion.yule_walker(x, 3)
@josef-pkt
josef-pkt Sep 20, 2014 Member

you could assert_allclose with sm.regresion.yule_walker(x.astype(float, 3) to make it more than a smoke test

@jseabold jseabold merged commit 2995145 into statsmodels:master Sep 20, 2014
@jseabold jseabold deleted the jseabold:yule-walker-casting branch Sep 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment