Skip to content

Commit c45a231

Browse files
committed
Update spectra.py
1 parent c795b29 commit c45a231

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spectra.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,10 @@ def get_plot_data(
310310
x_values = np.array(list(set(x_values)))
311311
x_values.sort()
312312

313-
y_values = np.sum([f(x_values) for f in functions], axis=0)
314-
313+
y_values = np.zeros(len(x_values))
314+
for i, f in enumerate(functions):
315+
y_values += f(x_values)
316+
315317
if show_functions:
316318
if (
317319
len(show_functions[0]) == 2 and

0 commit comments

Comments
 (0)