Skip to content

Commit 040379f

Browse files
committed
Replaces generator function
1 parent 7b09aeb commit 040379f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Diff for: financial/exponential_moving_average.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,8 @@ def exponential_moving_average(
6363

6464
doctest.testmod()
6565

66-
def test_gen_func(arr: list[float]):
67-
yield from arr
68-
6966
test_series = [2, 5, 3, 8.2, 6, 9, 10]
70-
test_generator = test_gen_func(test_series)
67+
test_generator = (ele for ele in test_series)
7168
test_window_size = 3
7269
result = exponential_moving_average(test_generator, test_window_size)
7370
print("Test series: ", test_series)

0 commit comments

Comments
 (0)