From 7321ce130fdb3ac1346410293956ebce805373ca Mon Sep 17 00:00:00 2001 From: Florent Jaillet <florent.jaillet@lis-lab.fr> Date: Tue, 5 Jun 2018 09:33:37 +0200 Subject: [PATCH] Handle NaN values correctly in tfplot() --- ltfatpy/gabor/tfplot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ltfatpy/gabor/tfplot.py b/ltfatpy/gabor/tfplot.py index 97d1f3d..0c5b38d 100644 --- a/ltfatpy/gabor/tfplot.py +++ b/ltfatpy/gabor/tfplot.py @@ -195,7 +195,7 @@ def tfplot(coef, step, yr, fs=None, dynrange=None, normalization='db', # 'dynrange' parameter is handled by converting it into clim # clim overrides dynrange, so do nothing if clim is already specified if dynrange and not clim: - maxclim = np.max(coef) + maxclim = np.nanmax(coef) clim = (maxclim - dynrange, maxclim) # Handle clim by thresholding and cutting -- GitLab