Skip to content

Commit

Permalink
fix windows loading with windowspath
Browse files Browse the repository at this point in the history
  • Loading branch information
alasdairwilson committed Jul 11, 2024
1 parent a4a527b commit a491a35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ripplemapper/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a491a35

Please sign in to comment.