From 3366e430f093894da0844cea3adc081146142799 Mon Sep 17 00:00:00 2001 From: Partha Chakraborty <1305117.pc@ugrad.cse.buet.ac.bd> Date: Thu, 4 Nov 2021 18:48:03 -0400 Subject: [PATCH] fixed: zip is not subscriptable In python3 zip is not subscriptable. However, in the next line, there is an attempt to subscript. Thus, the zip object has been wrapped in the list so that it can be subscriptable. --- 4.prioritized dqn.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/4.prioritized dqn.ipynb b/4.prioritized dqn.ipynb index 04dcfc7..5cc41e5 100644 --- a/4.prioritized dqn.ipynb +++ b/4.prioritized dqn.ipynb @@ -106,7 +106,7 @@ " weights /= weights.max()\n", " weights = np.array(weights, dtype=np.float32)\n", " \n", - " batch = zip(*samples)\n", + " batch = list(zip(*samples))\n", " states = np.concatenate(batch[0])\n", " actions = batch[1]\n", " rewards = batch[2]\n",