From 04aa1835020b87fc25b0bf1f013458051de8a956 Mon Sep 17 00:00:00 2001 From: Jouni Paulus Date: Fri, 1 Aug 2025 12:05:00 +0200 Subject: [PATCH] remove two debug printouts and suppress a numpy warning --- scripts/pyaudio3dtools/audioarray.py | 3 +-- tests/cmp_pcm.py | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/pyaudio3dtools/audioarray.py b/scripts/pyaudio3dtools/audioarray.py index 04b5ba9fae..3f9315ac0d 100644 --- a/scripts/pyaudio3dtools/audioarray.py +++ b/scripts/pyaudio3dtools/audioarray.py @@ -486,7 +486,6 @@ def compare( if get_ssnr: # length of segment is always 20ms len_seg = int(0.02 * fs) - print(len_seg, ref.shape, test.shape) result["SSNR"] = ssnr( ref, test, @@ -731,7 +730,7 @@ def ssnr( # if the reference signal was outside the thresholds for all segments in a channel, segment_counter is zero # for that channel and the division here would trigger a warning. We supress the warning and later # set the SSNR for those channels to nan manually instead (overwriting later is simply easier than adding ifs here) - with warnings.catch_warnings(): + with warnings.catch_warnings(action='ignore'): ssnr = np.round( 10 * np.log10(10 ** (np.sum(ss, axis=0) / segment_counter) - 1), 2 ) diff --git a/tests/cmp_pcm.py b/tests/cmp_pcm.py index a646e20ae5..78c0419b32 100755 --- a/tests/cmp_pcm.py +++ b/tests/cmp_pcm.py @@ -152,7 +152,6 @@ def cmp_pcm( odg = float(match_odg.groups()[0]) msg = f"Channel {n} ODG: {odg}" reason += " - " + msg - print(msg) if get_odg_bin: odg_files = {} -- GitLab