Skip to content

Commit

Permalink
CLN: Remote FutureWarning
Browse files Browse the repository at this point in the history
Remove unnecessary use of recarray to avoid FutureWarning
  • Loading branch information
bashtage committed Feb 7, 2017
1 parent 3feea49 commit 1e14b2e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion statsmodels/tsa/tests/test_adfuller_lag.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
def test_adf_autolag():
#see issue #246
#this is mostly a unit test
d2 = macrodata.load().data
d2 = macrodata.load_pandas().data

for k_trend, tr in enumerate(['nc', 'c', 'ct', 'ctt']):
#[None:'nc', 0:'c', 1:'ct', 2:'ctt']
Expand Down
5 changes: 2 additions & 3 deletions statsmodels/tsa/vector_ar/tests/test_svar.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
class TestSVAR(object):
@classmethod
def setupClass(cls):
mdata = sm.datasets.macrodata.load().data
mdata = sm.datasets.macrodata.load_pandas().data
mdata = mdata[['realgdp','realcons','realinv']]
names = mdata.dtype.names
data = mdata.view((float,3))
data = mdata.values
data = np.diff(np.log(data), axis=0)
A = np.asarray([[1, 0, 0],['E', 1, 0],['E', 'E', 1]])
B = np.asarray([['E', 0, 0], [0, 'E', 0], [0, 0, 'E']])
Expand Down
4 changes: 2 additions & 2 deletions statsmodels/tsa/vector_ar/tests/test_var.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ def test_bse(self):
assert_almost_equal(self.res1.bse, self.res2.bse, DECIMAL_4)

def get_macrodata():
data = sm.datasets.macrodata.load().data[['realgdp','realcons','realinv']]
names = data.dtype.names
data = sm.datasets.macrodata.load_pandas().data[['realgdp','realcons','realinv']]
data = data.to_records(index=False)
nd = data.view((float,3), type=np.ndarray)
nd = np.diff(np.log(nd), axis=0)
return nd.ravel().view(data.dtype, type=np.ndarray)
Expand Down

0 comments on commit 1e14b2e

Please sign in to comment.