Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update image processing example notebok imports and function call #3896

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 7 additions & 4 deletions docs/source/examples/Image Processing.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": ["remove-cell"]
"tags": [
"remove-cell"
]
},
"outputs": [],
"source": [
Expand All @@ -39,6 +41,7 @@
"from IPython.display import Image\n",
"from ipywidgets import interact, interactive, fixed\n",
"import matplotlib as mpl\n",
"import matplotlib.pyplot as plt\n",
"from skimage import data, filters, io, img_as_float\n",
"import numpy as np"
]
Expand Down Expand Up @@ -84,7 +87,7 @@
" # Don't let matplotlib autoscale the color range so we can control overall luminosity\n",
" vmax = 255 if arr.dtype == 'uint8' else 1.0\n",
" with BytesIO() as buffer:\n",
" mpl.image.imsave(buffer, arr, format=format, cmap=cmap, vmin=0, vmax=vmax)\n",
" plt.imsave(buffer, arr, format=format, cmap=cmap, vmin=0, vmax=vmax)\n",
" out = buffer.getvalue()\n",
" return Image(out)"
]
Expand Down Expand Up @@ -230,9 +233,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.5"
"version": "3.11.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}