Skip to content

Commit aa64fe3

Browse files
committed
fix typos & var consistency
1 parent 096286d commit aa64fe3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

fooof/core/jacobians.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Notes
44
-----
55
These functions line up with those in `funcs`.
6-
The parameters in these functions are labelled {a, b, c, ...}, but follow the order in `funcs`.
6+
The parameters in these functions are labeled {a, b, c, ...}, but follow the order in `funcs`.
77
These functions are designed to be passed into `curve_fit` to provide a computed Jacobian.
88
"""
99

@@ -15,7 +15,7 @@
1515
## Periodic fit functions
1616

1717
def jacobian_gauss(xs, *params):
18-
"""Create the Jacobian matrix for the Guassian function.
18+
"""Create the Jacobian matrix for the Gaussian function.
1919
2020
Parameters
2121
----------
@@ -30,7 +30,7 @@ def jacobian_gauss(xs, *params):
3030
Jacobian matrix, with shape [len(xs), n_params].
3131
"""
3232

33-
jacobians = np.zeros((len(xs), len(params)))
33+
jacobian = np.zeros((len(xs), len(params)))
3434

3535
for i, (a, b, c) in enumerate(zip(*[iter(params)] * 3)):
3636

@@ -44,11 +44,11 @@ def jacobian_gauss(xs, *params):
4444
exp_b = exp * b
4545

4646
ii = i * 3
47-
jacobians[:, ii] = (exp_b * ax) / c2
48-
jacobians[:, ii+1] = exp
49-
jacobians[:, ii+2] = (exp_b * ax2) / c3
47+
jacobian[:, ii] = (exp_b * ax) / c2
48+
jacobian[:, ii+1] = exp
49+
jacobian[:, ii+2] = (exp_b * ax2) / c3
5050

51-
return jacobians
51+
return jacobian
5252

5353

5454
## Aperiodic fit functions

0 commit comments

Comments
 (0)