mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-04-10 15:55:53 +00:00
Update ema_filter.py
np.allclose() function now has tighter tolerance values, with rtol=1e-5 and atol=1e-8
This commit is contained in:
parent
06775c4bf5
commit
235d527b9f
@ -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] = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user