Why is this PR needed?
The load/save functions in image_io currently only specify str filepaths in their docstrings, although some can also accept pathlib.Path.
What does this PR do?
This PR ensures that all load/save functions in image_io consistently handle both str and pathlib.Path. It favours using pathlib.Path internally wherever possible.
Description
What is this PR
Why is this PR needed? The load/save functions in
image_io
currently only specifystr
filepaths in their docstrings, although some can also acceptpathlib.Path
.What does this PR do? This PR ensures that all load/save functions in
image_io
consistently handle bothstr
andpathlib.Path
. It favours usingpathlib.Path
internally wherever possible.References
Closes https://github.com/brainglobe/brainglobe-utils/issues/47
How has this PR been tested?
image_io
tests were updated so that all load/save functions are tested with bothpathlib.Path
andstr
.Is this a breaking change?
No
Does this PR require an update to the documentation?
All relevant
image_io
docstrings were updated.Checklist: