Skip to content

Commit

Permalink
[DLFL23] 14-truck_backer_upper.ipynb - Fix oudated matplotlib API usa…
Browse files Browse the repository at this point in the history
…ge (#846)

* fix dependencies and outdated mpl api usage

* fix naming inconsistency

* Revert cosmetic changes

---------

Co-authored-by: Alfredo Canziani <[email protected]>
  • Loading branch information
dqian3 and Atcold authored Aug 27, 2024
1 parent 01bed6f commit 29fa960
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 6 additions & 6 deletions 14-truck_backer-upper.ipynb → 14-truck_backer_upper.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"outputs": [],
"source": [
"style.use(['dark_background', 'bmh'])\n",
"%matplotlib notebook"
"%matplotlib widget"
]
},
{
Expand Down Expand Up @@ -163,7 +163,7 @@
" ax.add_line(bar)\n",
"\n",
" car = Rectangle(\n",
" (x1, y1 - W / 2), L, W, 0, color='C2', alpha=0.8, transform=\n",
" (x1, y1 - W / 2), L, W, color='C2', alpha=0.8, transform=\n",
" matplotlib.transforms.Affine2D().rotate_deg_around(x1, y1, θ0 * 180 / π) +\n",
" ax.transData\n",
" )\n",
Expand Down Expand Up @@ -191,7 +191,7 @@
" \n",
" x, y = x - d * cos(θ1), y - d * sin(θ1) - W / 2\n",
" trailer = Rectangle(\n",
" (x, y), d, W, 0, color='C0', alpha=0.8, transform=\n",
" (x, y), d, W, color='C0', alpha=0.8, transform=\n",
" matplotlib.transforms.Affine2D().rotate_deg_around(x, y + W/2, θ1 * 180 / π) +\n",
" ax.transData\n",
" )\n",
Expand Down Expand Up @@ -252,7 +252,7 @@
"episodes = 10\n",
"inputs = list()\n",
"outputs = list()\n",
"# truck = Truck(); episodes = 10_000 # uncooment for creating the data set\n",
"# truck = Truck(); episodes = 10_000 # uncomment for creating the data set\n",
"\n",
"for episode in tqdm(range(episodes)):\n",
" \n",
Expand Down Expand Up @@ -400,7 +400,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 [conda env:pDL]",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -414,7 +414,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.2"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ dependencies:
- torchtext
- opencv
- librosa
- ipympl
- pip:
- torchviz

0 comments on commit 29fa960

Please sign in to comment.