From 77e4bef5703a33de28ad4b74130b0ad5f99616b9 Mon Sep 17 00:00:00 2001 From: Seyyed Fatemi Date: Wed, 28 Jun 2023 14:52:22 -0700 Subject: [PATCH] freqs_to_plot is an unused variable that frequently cause divide by zero. print("here") is also useless. --- pycochleagram/cochleagram.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pycochleagram/cochleagram.py b/pycochleagram/cochleagram.py index 50301aa..eb64267 100644 --- a/pycochleagram/cochleagram.py +++ b/pycochleagram/cochleagram.py @@ -132,7 +132,7 @@ def cochleagram(signal, sr, n, low_lim, hi_lim, sample_factor, # utils.filtshow(freqs, filts, hz_cutoffs, use_log_x=True) - freqs_to_plot = np.log10(freqs) + # freqs_to_plot = np.log10(freqs) # remove useless variable # print(filts.shape) # plt.figure(figsize=(18,5)) @@ -258,7 +258,7 @@ def human_cochleagram(signal, sr, n=None, low_lim=50, hi_lim=20000, """ if n is None: n = int(np.floor(erb.freq2erb(hi_lim) - erb.freq2erb(low_lim)) - 1) - print("here") + # print("here") # do not print out = cochleagram(signal, sr, n, low_lim, hi_lim, sample_factor, padding_size, downsample, nonlinearity, fft_mode, ret_mode, strict, **kwargs)