MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / _get_obs

Method _get_obs

pytorch/rl_trader.py:228–233  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

226
227
228 def _get_obs(self):
229 obs = np.empty(self.state_dim)
230 obs[:self.n_stock] = self.stock_owned
231 obs[self.n_stock:2*self.n_stock] = self.stock_price
232 obs[-1] = self.cash_in_hand
233 return obs
234
235
236

Callers 2

resetMethod · 0.95
stepMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected