flake8 and numpy.random.random_integers deprecation warning

This commit is contained in:
Peter Zhokhov
2018-10-16 14:58:23 -07:00
parent 8624bc629c
commit 8964d5ad45
2 changed files with 2 additions and 2 deletions

View File

@@ -183,7 +183,7 @@ def learn(network, env,
eval_episode_rewards = []
eval_qs = []
if eval_env is not None:
nenvsa_eval = eval_obs.shape[0]
nenvs_eval = eval_obs.shape[0]
eval_episode_reward = np.zeros(nenvs_eval, dtype = np.float32)
for t_rollout in range(nb_eval_steps):
eval_action, eval_q, _, _ = agent.step(eval_obs, apply_noise=False, compute_Q=True)

View File

@@ -51,7 +51,7 @@ class Memory(object):
def sample(self, batch_size):
# Draw such that we always have a proceeding element.
batch_idxs = np.random.random_integers(self.nb_entries - 2, size=batch_size)
batch_idxs = np.random.randint(self.nb_entries - 2, size=batch_size)
obs0_batch = self.observations0.get_batch(batch_idxs)
obs1_batch = self.observations1.get_batch(batch_idxs)