mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-04-25 23:23:37 +00:00
Update ema_filter.py
This commit is contained in:
parent
2e1193507b
commit
435591475d
@ -5,7 +5,7 @@ https://en.wikipedia.org/wiki/Moving_average
|
||||
"""
|
||||
|
||||
import numpy as np
|
||||
from typing import List
|
||||
from typing import Any
|
||||
|
||||
|
||||
class EMAFilter:
|
||||
@ -34,13 +34,13 @@ class EMAFilter:
|
||||
self.alpha = alpha
|
||||
self.ema_value = None
|
||||
|
||||
def apply(self, audio_signal: List[float]) -> np.ndarray:
|
||||
def apply(self, audio_signal: list[float]) -> np.ndarray:
|
||||
"""
|
||||
Apply the EMA filter to a sequence of
|
||||
audio signal values.
|
||||
|
||||
Parameters:
|
||||
audio_signal (List[float]): List of numerical values
|
||||
audio_signal (list[float]): List of numerical values
|
||||
representing the audio signal.
|
||||
|
||||
Returns:
|
||||
|
Loading…
x
Reference in New Issue
Block a user