Skip to content

Commit

Permalink
Fix to square limit example so it works on Python 2 (#1557)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlstevens authored and philippjfr committed Jun 16, 2017
1 parent 9de737a commit 4d18047
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/demos/bokeh/square_limit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@
" return hv.Spline((result.vertices, result.codes))\n",
"\n",
"def beside(spline1, spline2, n=1, m=1):\n",
" den = n + m\n",
" den = float(n + m)\n",
" t1 = Affine2D().scale(n / den, 1)\n",
" t2 = Affine2D().scale(m / den, 1).translate(n / den, 0)\n",
" return T(spline1, t1) * T(spline2, t2)\n",
"\n",
"def above(spline1, spline2, n=1, m=1):\n",
" den = n + m\n",
" den = float(n + m)\n",
" t1 = Affine2D().scale(1, n / den).translate(0, m / den)\n",
" t2 = Affine2D().scale(1, m / den)\n",
" return T(spline1, t1) * T(spline2, t2)\n",
Expand Down
4 changes: 2 additions & 2 deletions examples/demos/matplotlib/square_limit.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@
" return hv.Spline((result.vertices, result.codes))\n",
"\n",
"def beside(spline1, spline2, n=1, m=1):\n",
" den = n + m\n",
" den = float(n + m)\n",
" t1 = Affine2D().scale(n / den, 1)\n",
" t2 = Affine2D().scale(m / den, 1).translate(n / den, 0)\n",
" return T(spline1, t1) * T(spline2, t2)\n",
"\n",
"def above(spline1, spline2, n=1, m=1):\n",
" den = n + m\n",
" den = float(n + m)\n",
" t1 = Affine2D().scale(1, n / den).translate(0, m / den)\n",
" t2 = Affine2D().scale(1, m / den)\n",
" return T(spline1, t1) * T(spline2, t2)\n",
Expand Down

0 comments on commit 4d18047

Please sign in to comment.