Skip to content

Commit

Permalink
Merge pull request #41 from smoia/fix/wrapper
Browse files Browse the repository at this point in the history
Fix arguments pass in `physio_or_numpy` wrapper
  • Loading branch information
smoia authored Oct 9, 2024
2 parents 2842a86 + a608820 commit 53956bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions physioqc/metrics/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def physio_or_numpy(func):

@functools.wraps(func)
def wrapper(*args, **kwargs):
# signal must always be args[0]
# signal/data must always be args[0]
if hasattr(args[0], "history"):
args[0] = args[0].data
args = (args[0].data,) + args[1:]
return func(*args, **kwargs)

return wrapper
Expand Down

0 comments on commit 53956bb

Please sign in to comment.