Skip to content

Commit 1b610c8

Browse files
committed
update min max call
1 parent 0615440 commit 1b610c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wfdb/io/_signal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,8 +840,8 @@ def calc_adc_params(self):
840840
minvals = []
841841
maxvals = []
842842
for ch in self.e_p_signal:
843-
minvals.append(min(x for x in ch if not math.isnan(x)))
844-
maxvals.append(max(x for x in ch if not math.isnan(x)))
843+
minvals.append(np.nanmin(ch))
844+
maxvals.append(np.nanmax(ch))
845845

846846
if any(x == math.inf for x in minvals) or any(
847847
x == math.inf for x in maxvals

0 commit comments

Comments
 (0)