Skip to content
  • Sponsor numpy/numpy-tutorials

  • Notifications You must be signed in to change notification settings
  • Fork 195

Commit 635b0e8

Browse files
authoredAug 29, 2022
Update imageio.imread to v3.imread in x-ray img processing tutorial (#143)
* Use v3 to replace v2 as recommended by imageio `imageio.imread` is not supported and `imageio.v2` has issues with lazy import, replaced with `imageio.v3.imread` instead as recommended by the `imageio` module maintainers.
1 parent d1ee781 commit 635b0e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎content/tutorial-x-ray-image-processing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ import imageio
119119
120120
DIR = "tutorial-x-ray-image-processing"
121121
122-
xray_image = imageio.imread(os.path.join(DIR, "00000011_001.png"))
122+
xray_image = imageio.v3.imread(os.path.join(DIR, "00000011_001.png"))
123123
```
124124

125125
**2.** Check that its shape is 1024x1024 pixels and that the array is made up of
@@ -157,7 +157,7 @@ import numpy as np
157157
num_imgs = 9
158158
159159
combined_xray_images_1 = np.array(
160-
[imageio.imread(os.path.join(DIR, f"00000011_00{i}.png")) for i in range(num_imgs)]
160+
[imageio.v3.imread(os.path.join(DIR, f"00000011_00{i}.png")) for i in range(num_imgs)]
161161
)
162162
```
163163

0 commit comments

Comments
 (0)