Skip to content

Commit cd81783

Browse files
authored
update image processing example notebok imports and function call (#3896)
1 parent 5ce66fc commit cd81783

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

docs/source/examples/Image Processing.ipynb

+7-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
"cell_type": "code",
1919
"execution_count": null,
2020
"metadata": {
21-
"tags": ["remove-cell"]
21+
"tags": [
22+
"remove-cell"
23+
]
2224
},
2325
"outputs": [],
2426
"source": [
@@ -39,6 +41,7 @@
3941
"from IPython.display import Image\n",
4042
"from ipywidgets import interact, interactive, fixed\n",
4143
"import matplotlib as mpl\n",
44+
"import matplotlib.pyplot as plt\n",
4245
"from skimage import data, filters, io, img_as_float\n",
4346
"import numpy as np"
4447
]
@@ -84,7 +87,7 @@
8487
" # Don't let matplotlib autoscale the color range so we can control overall luminosity\n",
8588
" vmax = 255 if arr.dtype == 'uint8' else 1.0\n",
8689
" with BytesIO() as buffer:\n",
87-
" mpl.image.imsave(buffer, arr, format=format, cmap=cmap, vmin=0, vmax=vmax)\n",
90+
" plt.imsave(buffer, arr, format=format, cmap=cmap, vmin=0, vmax=vmax)\n",
8891
" out = buffer.getvalue()\n",
8992
" return Image(out)"
9093
]
@@ -230,9 +233,9 @@
230233
"name": "python",
231234
"nbconvert_exporter": "python",
232235
"pygments_lexer": "ipython3",
233-
"version": "3.10.5"
236+
"version": "3.11.4"
234237
}
235238
},
236239
"nbformat": 4,
237-
"nbformat_minor": 2
240+
"nbformat_minor": 4
238241
}

0 commit comments

Comments
 (0)