Remove a warning when computing left_proba

This commit is contained in:
Aurélien Geron
2024-01-19 19:01:59 +13:00
parent b2a2533543
commit 4f5aa43f92
2 changed files with 2 additions and 2 deletions

View File

@@ -807,7 +807,7 @@
"# extra code a function that creates an animation for a given policy model\n",
"\n",
"def pg_policy(obs):\n",
" left_proba = model.predict(obs[np.newaxis], verbose=0)\n",
" left_proba = model.predict(obs[np.newaxis], verbose=0)[0][0]\n",
" return int(np.random.rand() > left_proba)\n",
"\n",
"np.random.seed(42)\n",