fix the doc error: module 'scipy.misc' has no attribute 'face'

This commit is contained in:
Jane Liu 2025-01-05 23:02:17 -08:00
parent 90d8f37863
commit 77c6947a59
3 changed files with 5 additions and 4 deletions

View File

@ -121,13 +121,13 @@
}
],
"source": [
"from scipy import misc\n",
"from scipy import datasets\n",
"import jax.scipy as jsp\n",
"\n",
"fig, ax = plt.subplots(1, 3, figsize=(12, 5))\n",
"\n",
"# Load a sample image; compute mean() to convert from RGB to grayscale.\n",
"image = jnp.array(misc.face().mean(-1))\n",
"image = jnp.array(datasets.face().mean(-1))\n",
"ax[0].imshow(image, cmap='binary_r')\n",
"ax[0].set_title('original')\n",
"\n",

View File

@ -75,13 +75,13 @@ For example, here is a simple approach to de-noising an image based on convoluti
:id: Jk5qdnbv6QgT
:outputId: 292205eb-aa09-446f-eec2-af8c23cfc718
from scipy import misc
from scipy import datasets
import jax.scipy as jsp
fig, ax = plt.subplots(1, 3, figsize=(12, 5))
# Load a sample image; compute mean() to convert from RGB to grayscale.
image = jnp.array(misc.face().mean(-1))
image = jnp.array(datasets.face().mean(-1))
ax[0].imshow(image, cmap='binary_r')
ax[0].set_title('original')

View File

@ -17,6 +17,7 @@ pytest-xdist
# Packages used for notebook execution
matplotlib
scikit-learn
pooch
numpy
rich[jupyter]
cmake