Skip to content

Commit 9e30164

Browse files
committed
🐛 Fix reading of str input
1 parent 1d2ca5f commit 9e30164

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tiatoolbox/models/engine/engine_abc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ def _validate_images_masks(images: list | np.ndarray) -> list | np.ndarray:
906906
)
907907
raise ValueError(msg)
908908

909-
return [Path(image) for image in images]
909+
return [Path(image) if isinstance(image, str) else image for image in images]
910910

911911
@staticmethod
912912
def _validate_input_numbers(

0 commit comments

Comments
 (0)