Skip to content

Commit afd109e

Browse files
committed
minor tweak to looping over gaussian params
1 parent 8788431 commit afd109e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

fooof/core/funcs.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ def gaussian_function(xs, *params):
3232

3333
ys = np.zeros_like(xs)
3434

35-
for ii in range(0, len(params), 3):
36-
37-
ctr, hgt, wid = params[ii:ii+3]
35+
for ctr, hgt, wid in zip(*[iter(params)] * 3):
3836

3937
ys = ys + hgt * np.exp(-(xs-ctr)**2 / (2*wid**2))
4038

0 commit comments

Comments
 (0)