Skip to content

Commit 36ac2c0

Browse files
authored
Replace pd.as_matrix by pd.values
See GH18458(pandas-dev/pandas#18458). Since as_matrix is deprecated for pd.DataFrame and pd.Series, use data.values instead.
1 parent 07154e3 commit 36ac2c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

environment.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def load_data(self):
8282
returns=pd.read_csv(self.returns, index_col=0)
8383
assets=np.array(returns.columns)
8484
dates=np.array(returns.index)
85-
returns=returns.as_matrix()
85+
returns=returns.values()
8686
return pd.DataFrame(prices,
8787
columns = assets,
8888
index = dates
@@ -124,4 +124,4 @@ def local_portfolio(returns, weights):
124124
rew = np.array([rew] * len(self.data.columns))
125125

126126
return np.dot(returns, weights), rew
127-
127+

0 commit comments

Comments
 (0)