Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ def calculate_fourier_coefficients(xs, ys, num_points, coefficients):
|
|
38 |
|
39 |
N = coefficients
|
40 |
indices = [0] + [j for i in range(1, N + 1) for j in (i, -i)]
|
41 |
-
with ThreadPoolExecutor(max_workers=
|
42 |
coefs = list(executor.map(lambda n: (compute_cn(f_precomputed, n, t_values), n), indices))
|
43 |
|
44 |
return coefs
|
|
|
38 |
|
39 |
N = coefficients
|
40 |
indices = [0] + [j for i in range(1, N + 1) for j in (i, -i)]
|
41 |
+
with ThreadPoolExecutor(max_workers=2) as executor:
|
42 |
coefs = list(executor.map(lambda n: (compute_cn(f_precomputed, n, t_values), n), indices))
|
43 |
|
44 |
return coefs
|