Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
maestroque committed Aug 19, 2024
1 parent bbe49a6 commit d82ef72
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions physutils/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import importlib
import json
import os
import os.path as op

import numpy as np
Expand Down Expand Up @@ -140,7 +141,7 @@ def load_physio(data, *, fs=None, dtype=None, history=None, allow_pickle=False):
Parameters
----------
data : str or array_like or Physio_like
data : str, os.path.PathLike or array_like or Physio_like
Input physiological data. If array_like, should be one-dimensional
fs : float, optional
Sampling rate of `data`. Default: None
Expand All @@ -165,7 +166,7 @@ def load_physio(data, *, fs=None, dtype=None, history=None, allow_pickle=False):

# first check if the file was made with `save_physio`; otherwise, try to
# load it as a plain text file and instantiate a history
if isinstance(data, str):
if isinstance(data, str) or isinstance(data, os.PathLike):
try:
inp = dict(np.load(data, allow_pickle=allow_pickle))
for attr in EXPECTED:
Expand Down

0 comments on commit d82ef72

Please sign in to comment.