From 94116327c538cd527c5075e233f1eea828c87cb7 Mon Sep 17 00:00:00 2001 From: Dominique Benielli <dominique.benielli@univ-amu.fr> Date: Fri, 9 May 2025 16:30:11 +0200 Subject: [PATCH] warning suppressed --- ltfatpy/fourier/dcti.py | 2 +- ltfatpy/fourier/dctii.py | 4 ++-- ltfatpy/fourier/dctiii.py | 4 ++-- ltfatpy/fourier/dstii.py | 4 ++-- ltfatpy/fourier/dstiii.py | 2 +- ltfatpy/fourier/psech.py | 2 +- ltfatpy/gabor/dgt.py | 2 +- ltfatpy/gabor/idgt.py | 2 +- ltfatpy/gabor/phaselock.py | 4 ++-- ltfatpy/gabor/tfplot.py | 4 ++-- ltfatpy/sigproc/normalize.py | 4 ++-- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/ltfatpy/fourier/dcti.py b/ltfatpy/fourier/dcti.py index c5c0a14..de8f304 100644 --- a/ltfatpy/fourier/dcti.py +++ b/ltfatpy/fourier/dcti.py @@ -115,7 +115,7 @@ def dcti(f, L=None, dim=None): .. math:: w\\left(n\\right)=\\begin{cases}\\frac{1}{\\sqrt{2}} & \\text{if }n=0 - \\text{ or }n=L-1 \\\ 1 & \\text{otherwise}\\end{cases} + \\text{ or }n=L-1 \\ 1 & \\text{otherwise}\\end{cases} Then diff --git a/ltfatpy/fourier/dctii.py b/ltfatpy/fourier/dctii.py index 123c1fc..c8303f2 100644 --- a/ltfatpy/fourier/dctii.py +++ b/ltfatpy/fourier/dctii.py @@ -107,7 +107,7 @@ def dctii(f, L=None, dim=None): The transform is real (output is real if input is real) and it is orthonormal. - This is the inverse of \|dctiii\|. + This is the inverse of \\|dctiii\\|. Let f be a signal of length **L**, let :math:`c=dctii(f)` and define the vector **w** of length **L** by @@ -117,7 +117,7 @@ def dctii(f, L=None, dim=None): .. math:: w\\left(n\\right)=\\begin{cases}\\frac{1}{\\sqrt{2}} & \\text{if }n=0 - \\\ 1 & \\text{otherwise}\\end{cases} + \\ 1 & \\text{otherwise}\\end{cases} Then diff --git a/ltfatpy/fourier/dctiii.py b/ltfatpy/fourier/dctiii.py index 7c0542d..506a78d 100644 --- a/ltfatpy/fourier/dctiii.py +++ b/ltfatpy/fourier/dctiii.py @@ -105,7 +105,7 @@ def dctiii(f, L=None, dim=None): The transform is real (output is real if input is real) and it is orthonormal. - This is the inverse of \|dctii\|. + This is the inverse of \\|dctii\\|. Let f be a signal of length **L**, let :math:`c=dctiii(f)` and define the vector **w** of length **L** by @@ -115,7 +115,7 @@ def dctiii(f, L=None, dim=None): .. math:: w\\left(n\\right)=\\begin{cases}\\frac{1}{\\sqrt{2}} & \\text{if }n=0 - \\text{ or }n=L-1 \\\ 1 & \\text{otherwise}\\end{cases} + \\text{ or }n=L-1 \\ 1 & \\text{otherwise}\\end{cases} Then diff --git a/ltfatpy/fourier/dstii.py b/ltfatpy/fourier/dstii.py index 800c544..f034842 100644 --- a/ltfatpy/fourier/dstii.py +++ b/ltfatpy/fourier/dstii.py @@ -103,7 +103,7 @@ def dstii(f, L=None, dim=None): The transform is real (output is real if input is real) and orthonormal. - The inverse transform of \\|dstii\| is \\|dstiii\|. + The inverse transform of \\|dstii\\| is \\|dstiii\\|. Let **f** be a signal of length **L**, let ``c=dstii(f)`` and define the vector **w** of length **L** by @@ -113,7 +113,7 @@ def dstii(f, L=None, dim=None): .. math:: w\\left(n\\right)=\\begin{cases}\\frac{1}{\\sqrt{2}} & - \\text{if }n=L-1 \\\ 1 & \\text{otherwise}\\end{cases} + \\text{if }n=L-1 \\ 1 & \\text{otherwise}\\end{cases} Then diff --git a/ltfatpy/fourier/dstiii.py b/ltfatpy/fourier/dstiii.py index 0a0359e..a0ce139 100644 --- a/ltfatpy/fourier/dstiii.py +++ b/ltfatpy/fourier/dstiii.py @@ -113,7 +113,7 @@ def dstiii(f, L=None, dim=None): .. math:: w\\left(n\\right)=\\begin{cases}\\frac{1}{\\sqrt{2}} & - \\text{if }n=L-1 \\\ 1 & \\text{otherwise}\\end{cases} + \\text{if }n=L-1 \\ 1 & \\text{otherwise}\\end{cases} Then diff --git a/ltfatpy/fourier/psech.py b/ltfatpy/fourier/psech.py index 58cfd3c..aff6dc9 100644 --- a/ltfatpy/fourier/psech.py +++ b/ltfatpy/fourier/psech.py @@ -91,7 +91,7 @@ def psech(L, tfr=None, s=None, **kwargs): ``psech(L,tfr)`` computes samples of a periodized hyperbolic secant. The function returns a regular sampling of the periodization - of the function :math:`sech(\pi\cdot x)` + of the function :math:`sech(\\pi\\cdot x)` The returned function has norm equal to 1. diff --git a/ltfatpy/gabor/dgt.py b/ltfatpy/gabor/dgt.py index 8be57a9..1f01630 100644 --- a/ltfatpy/gabor/dgt.py +++ b/ltfatpy/gabor/dgt.py @@ -173,7 +173,7 @@ def dgt(f, g, a, M, L=None, pt='freqinv'): c\\left(m+1,n+1\\right)=\\sum_{l=0}^{L-1}f(l+1)\\overline{g(l-an+1)} e^{-2\\pi ilm/M} - where :math:`m=0,\ldots,M-1`, :math:`n=0, \\ldots,N-1` and :math:`l-an` + where :math:`m=0,\\ldots,M-1`, :math:`n=0, \\ldots,N-1` and :math:`l-an` are computed modulo **L**. - Additional parameters: diff --git a/ltfatpy/gabor/idgt.py b/ltfatpy/gabor/idgt.py index df7da92..35f8cb1 100644 --- a/ltfatpy/gabor/idgt.py +++ b/ltfatpy/gabor/idgt.py @@ -117,7 +117,7 @@ def idgt(coef, g, a, Ls=None, pt='freqinv'): one column vector for each of the TF-planes in **c**. Assume that ``f=idgt(c, g, a, L)`` for an array **c** of size - :math:`M \times N`. Then the following holds for :math:`k=0,\ldots,L-1`: + :math:`M \\times N`. Then the following holds for :math:`k=0,\\ldots,L-1`: .. math:: diff --git a/ltfatpy/gabor/phaselock.py b/ltfatpy/gabor/phaselock.py index 5e5d544..5a4a472 100644 --- a/ltfatpy/gabor/phaselock.py +++ b/ltfatpy/gabor/phaselock.py @@ -103,8 +103,8 @@ def phaselock(c, a): c(m+1,n+1) = sum f(l+1)*exp(-2*pi*i*m*(l-n*a)/M)*conj(g(l-a*n+1)), l=0 - .. math:: c\\left(m+1,n+1\\right)=\sum_{l=0}^{L-1}f(l+1) - e^{-2\pi im(l-na)/M}\overline{g(l-an+1)}, + .. math:: c\\left(m+1,n+1\\right)=\\sum_{l=0}^{L-1}f(l+1) + e^{-2\\pi im(l-na)/M}\\overline{g(l-an+1)}, where ``m = 0,..., M-1`` and ``n = 0,..., N-1`` and ``l-a*n`` are computed modulo ``L``. diff --git a/ltfatpy/gabor/tfplot.py b/ltfatpy/gabor/tfplot.py index a5aa845..670d054 100644 --- a/ltfatpy/gabor/tfplot.py +++ b/ltfatpy/gabor/tfplot.py @@ -123,12 +123,12 @@ def tfplot(coef, step, yr, fs=None, dynrange=None, normalization='db', Possible values for **normalization**: ============ ========================================================== - ``'db'`` Apply :math:`20*\log_{10}` to the coefficients. This makes + ``'db'`` Apply :math:`20*\\log_{10}` to the coefficients. This makes it possible to see very weak phenomena, but it might show too much noise. A logarithmic scale is more adapted to perception of sound. This is the default. - ``'dbsq'`` Apply :math:`10*\log_{10}` to the coefficients. Same as + ``'dbsq'`` Apply :math:`10*\\log_{10}` to the coefficients. Same as the ``'db'`` option, but assume that the input is already squared. diff --git a/ltfatpy/sigproc/normalize.py b/ltfatpy/sigproc/normalize.py index 5c4b089..7d2971d 100644 --- a/ltfatpy/sigproc/normalize.py +++ b/ltfatpy/sigproc/normalize.py @@ -145,10 +145,10 @@ def normalize(f, norm='2', dim=None): fnorm[ii] = LA.norm(f[:, ii], np.inf) f[:, ii] = f[:, ii] / fnorm[ii] elif norm == 'rms': - fnorm[ii] = rms(f[:, ii]) + fnorm[ii] = rms(f[:, ii]).item() f[:, ii] = f[:, ii] / fnorm[ii] elif norm == 's0': - fnorm[ii] = s0norm(f[:, ii]) + fnorm[ii] = s0norm(f[:, ii]).item() f[:, ii] = f[:, ii] / fnorm[ii] elif norm == 'wav': if np.issubdtype(f.dtype, np.floating): -- GitLab