33Notes
44-----
55These 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`.
77These functions are designed to be passed into `curve_fit` to provide a computed Jacobian.
88"""
99
1515## Periodic fit functions
1616
1717def 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