From a491a351e7c24235985b8dae07fc859905c6fa3b Mon Sep 17 00:00:00 2001 From: Alasdair Wilson Date: Thu, 11 Jul 2024 01:00:43 +0100 Subject: [PATCH] fix windows loading with windowspath --- ripplemapper/io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ripplemapper/io.py b/ripplemapper/io.py index 9722b74..cc9db0c 100644 --- a/ripplemapper/io.py +++ b/ripplemapper/io.py @@ -29,7 +29,7 @@ def load(file: str | PosixPath): def load_image(file: str | PosixPath) -> np.ndarray: """Load an image file based on file extension.""" # TODO (ADW): this needs to be refactored to allow lists. - if isinstance(file, PosixPath): + if isinstance(file, PosixPath) | isinstance(file, WindowsPath): file = str(file.resolve()) if file.endswith('.tif') or file.endswith('.tiff'): _, img_data = load_tif(file)