Skip to content

Commit

Permalink
Fix format(w, i + 1)
Browse files Browse the repository at this point in the history
  • Loading branch information
haipinglu committed Dec 4, 2020
1 parent 1fd203a commit 583c111
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lab 6 - Logistic regression & pytorch for DL.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@
" \"\"\"Creates a string description of a polynomial.\"\"\"\n",
" result = 'y = '\n",
" for i, w in enumerate(W):\n",
" result += '{:+.2f} x^{} '.format(w, len(W) - i)\n",
" result += '{:+.2f} x^{} '.format(w, i + 1)\n",
" result += '{:+.2f}'.format(b[0])\n",
" return result\n",
"\n",
Expand Down

0 comments on commit 583c111

Please sign in to comment.