Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
calvinchai committed Nov 19, 2024
1 parent b3e8c58 commit f0a76c4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions linc_convert/modalities/psoct/multi_slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ def wrapper(inp: str, out: str = None, **kwargs: dict) -> Any: # noqa: ANN401

return wrapper


@contextmanager
def _mapmat(fnames, key=None):
"""Load or memory-map an array stored in a .mat file"""
def _mapmat(fnames: list[str], key: str = None) -> None:
"""Load or memory-map an array stored in a .mat file."""
loaded_data = []

for fname in fnames:
Expand All @@ -70,7 +71,8 @@ def _mapmat(fnames, key=None):
key = list(f.keys())[0]
if len(f.keys()) > 1:
warn(
f'More than one key in .mat file {fname}, arbitrarily loading "{key}"'
f"More than one key in .mat file {fname}, "
f'arbitrarily loading "{key}"'
)

if key not in f.keys():
Expand All @@ -89,7 +91,7 @@ def _mapmat(fnames, key=None):
@multi_slice.default
@_automap
def convert(
inp: str,
inp: list[str],
out: Optional[str] = None,
*,
key: Optional[str] = None,
Expand Down Expand Up @@ -244,4 +246,3 @@ def convert(
niftizarr_write_header(
omz, shape, affine, omz["0"].dtype, to_nifti_unit(unit), nifti_version=2
)

0 comments on commit f0a76c4

Please sign in to comment.