From e7c66b4b8d8db9ed731b9596fa4350ce5c8352f5 Mon Sep 17 00:00:00 2001 From: maestroque Date: Tue, 9 Jul 2024 14:07:10 +0300 Subject: [PATCH] Fix new_physio_like function --- physutils/physio.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/physutils/physio.py b/physutils/physio.py index 4e0d78a..a0dc577 100644 --- a/physutils/physio.py +++ b/physutils/physio.py @@ -220,6 +220,10 @@ def new_physio_like( if suppdata is None: suppdata = ref_physio._suppdata if copy_suppdata else None + + label = ref_physio.label if copy_label else None + physio_type = ref_physio.physio_type if copy_physio_type else None + computed_metrics = list(ref_physio.computed_metrics) if copy_computed_metrics else [] # make new class out = ref_physio.__class__( @@ -228,7 +232,10 @@ def new_physio_like( history=history, metadata=metadata, suppdata=suppdata, + physio_type=physio_type, + label=label, ) + out._computed_metrics = computed_metrics return out