Skip to content

Commit 712b0ab

Browse files
committed
Improve NumPy example
1 parent 165f59f commit 712b0ab

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/numpy_heatmap.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"y, x = np.mgrid[slice(1, 5 + dy, dy),\n",
2222
" slice(1, 5 + dx, dx)]\n",
2323
"\n",
24-
"z = np.sin(x)**0 + np.cos(0 + y*x) * np.cos(x)"
24+
"z = np.sin(x)**10 + np.cos(0 + y*x) * np.cos(x)"
2525
]
2626
},
2727
{
@@ -44,7 +44,7 @@
4444
"metadata": {},
4545
"outputs": [],
4646
"source": [
47-
"n_pixels = 10\n",
47+
"n_pixels = 5\n",
4848
"\n",
4949
"canvas = Canvas(size=(z.shape[0] * n_pixels, z.shape[1] * n_pixels))\n",
5050
"canvas"
@@ -84,10 +84,10 @@
8484
"from time import sleep\n",
8585
"\n",
8686
"for i in range(11):\n",
87-
" z = np.sin(x)**i + np.cos(i + y*x) * np.cos(x)\n",
87+
" z = np.sin(x)**10 + np.cos(i + y*x) * np.cos(x)\n",
8888
" draw()\n",
8989
" \n",
90-
" sleep(0.5)"
90+
" sleep(0.1)"
9191
]
9292
},
9393
{

0 commit comments

Comments
 (0)