Skip to content

Commit 3c605f3

Browse files
committed
BUG: Fix a bug which was ignoring npy files.
- Fix a bug which was ignoring npy files.
1 parent 90addc0 commit 3c605f3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tiatoolbox/wsicore/wsireader.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def open(input_img):
9494
input_img = np.load(input_img)
9595
wsi = VirtualWSIReader(input_img)
9696

97-
if suffixes[-2:] in ([".ome", ".tiff"],):
97+
elif suffixes[-2:] in ([".ome", ".tiff"],):
9898
wsi = TIFFWSIReader(input_img)
9999

100100
elif suffixes[-1] in (".jpg", ".png", ".tif"):
@@ -117,6 +117,7 @@ def open(input_img):
117117
wsi = input_img
118118
else:
119119
raise TypeError("Please input correct image path or an ndarray image.")
120+
120121
return wsi
121122

122123
def __init__(self, input_img):

0 commit comments

Comments
 (0)