From 235d527b9f7fded3503bc57087446f26fe026391 Mon Sep 17 00:00:00 2001 From: Shreya <95279016+Shreya123714@users.noreply.github.com> Date: Thu, 31 Oct 2024 09:15:46 +0530 Subject: [PATCH] Update ema_filter.py np.allclose() function now has tighter tolerance values, with rtol=1e-5 and atol=1e-8 --- audio_filters/ema_filter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/audio_filters/ema_filter.py b/audio_filters/ema_filter.py index cb7a0d644..8f63c5b12 100644 --- a/audio_filters/ema_filter.py +++ b/audio_filters/ema_filter.py @@ -48,7 +48,8 @@ class EMAFilter: Example: >>> ema_filter = EMAFilter(0.2) >>> np.allclose(ema_filter.apply([0.1, 0.5, 0.8, 0.6, 0.3, 0.9, 0.4]), - ... [0.1, 0.18, 0.304, 0.3632, 0.35056, 0.460448, 0.4483584]) + ... [0.1, 0.18, 0.304, 0.3632, 0.35056, 0.460448, 0.4483584] + ... rtol=1e-5, atol=1e-8) True """ ema_signal: list[float] = []