Skip to content

Commit

Permalink
update image processing example notebok imports and function call (#3896
Browse files Browse the repository at this point in the history
)
  • Loading branch information
RRosio authored Aug 22, 2024
1 parent 5ce66fc commit cd81783
Showing 1 changed file with 7 additions and 4 deletions.
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
}

0 comments on commit cd81783

Please sign in to comment.