From 312c98338cd0d9960ce6d6932861fc858e8d6475 Mon Sep 17 00:00:00 2001 From: Amine Sehili Date: Thu, 31 Oct 2024 09:06:39 +0100 Subject: [PATCH] Update latex code in docstring --- auditok/signal.py | 2 +- auditok/util.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/auditok/signal.py b/auditok/signal.py index 4b088a6..db9e10c 100644 --- a/auditok/signal.py +++ b/auditok/signal.py @@ -90,7 +90,7 @@ def calculate_energy(x, agg_fn=None): The energy is calculated as: .. math:: - \text{energy} = 20 \log\left(\sqrt{\frac{1}{N} \sum_{i=1}^{N} a_i^2}\right) % # noqa: W605 + \\text{energy} = 20 \\log(\\sqrt({1}/{N} \\sum_{i=1}^{N} {a_i}^2)) % # noqa: W605 where `a_i` is the i-th audio sample and `N` is the total number of samples in `x`. diff --git a/auditok/util.py b/auditok/util.py index 3f7e2e1..c13d648 100644 --- a/auditok/util.py +++ b/auditok/util.py @@ -260,7 +260,7 @@ class AudioEnergyValidator(DataValidator): as: .. math:: - energy = 20 \log(\sqrt({1}/{N} \sum_{i=1}^{N} {a_i}^2)) % # noqa: W605 + \\text{energy} = 20 \\log(\\sqrt({1}/{N} \\sum_{i=1}^{N} {a_i}^2)) % # noqa: W605 where `a_i` represents the i-th audio sample.