Skip to content

Commit be32e20

Browse files
rifatrakibrossbar
authored andcommitted
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 c94993f commit be32e20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: 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.v2.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.v2.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)