Skip to content

Commit

Permalink
Merge pull request MedMNIST#29 from orientnab/orientnab-patch-1-monta…
Browse files Browse the repository at this point in the history
…ge2d

Update montage2d to scikit-image 0.20
  • Loading branch information
duducheng authored Apr 2, 2023
2 parents 16e3ead + 457c2d2 commit 50cc28c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions medmnist/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ def save2d(imgs, labels, img_folder,


def montage2d(imgs, n_channels, sel):

sel_img = imgs[sel]
montage_arr = skimage_montage(sel_img, multichannel=(n_channels == 3))
channel_axis = 3 if n_channels == 3 else None
montage_arr = skimage_montage(sel_img, channel_axis=channel_axis)
montage_img = Image.fromarray(montage_arr)

return montage_img
Expand Down

0 comments on commit 50cc28c

Please sign in to comment.