@@ -269,7 +269,7 @@ def det_deriv(matrix, i, j):
269
269
kk , ll = k - 1 if k > j else k , l - 1 if l > i else l
270
270
minor_p = (- 1 ) ** (i + j ) * det_deriv (mji , kk , ll )
271
271
272
- j_matrix [k , l ] = (minor_p * det - minor * det_p ) / det ** 2
272
+ j_matrix [k , l ] = (minor_p * det - minor * det_p ) / det ** 2
273
273
274
274
jacobians [i ].append (j_matrix )
275
275
@@ -312,7 +312,7 @@ def chi_inverse(chi, chi_err, method="full"):
312
312
)
313
313
314
314
# Assume cross-covariances are zero
315
- chi_covar = np .diag (np .reshape (chi_err_block ** 2 , [n_response * n_response ]))
315
+ chi_covar = np .diag (np .reshape (chi_err_block ** 2 , [n_response * n_response ]))
316
316
317
317
(chi_inv , chi_inv_var , chi_inv_jacobs ) = inverse_matrix_uncertainty (
318
318
chi_block , chi_covar
@@ -359,12 +359,12 @@ def compute_uj_simple_two_by_two(
359
359
umat_err = f_matrix_err [2 * i : 2 * (i + 1 ), 2 * i : 2 * (i + 1 )]
360
360
361
361
uval = 0.25 * np .sum (umat )
362
- uval_err = 0.25 * np .sqrt (np .sum (umat_err ** 2 ))
362
+ uval_err = 0.25 * np .sqrt (np .sum (umat_err ** 2 ))
363
363
364
364
jmat = np .array ([[- 1 , 1 ], [1 , - 1 ]]) * umat .copy ()
365
365
jmat_err = umat_err .copy ()
366
366
jval = 0.25 * np .sum (jmat )
367
- jval_err = 0.25 * np .sqrt (np .sum (jmat_err ** 2 ))
367
+ jval_err = 0.25 * np .sqrt (np .sum (jmat_err ** 2 ))
368
368
369
369
return uval , uval_err , jval , jval_err
370
370
@@ -439,7 +439,7 @@ def fmat_deriv_nscf(kk, ll, ik, il):
439
439
uval_err = uval_err + np .sum (
440
440
np .dot (
441
441
np .transpose (jacob_vec ),
442
- np .dot (np .diag (np .reshape (chi_sub_scf_err ** 2 , [4 ])), jacob_vec ),
442
+ np .dot (np .diag (np .reshape (chi_sub_scf_err ** 2 , [4 ])), jacob_vec ),
443
443
)
444
444
)
445
445
# nscf component
@@ -460,7 +460,7 @@ def fmat_deriv_nscf(kk, ll, ik, il):
460
460
uval_err = uval_err + np .sum (
461
461
np .dot (
462
462
np .transpose (jacob_vec ),
463
- np .dot (np .diag (np .reshape (chi_sub_nscf_err ** 2 , [4 ])), jacob_vec ),
463
+ np .dot (np .diag (np .reshape (chi_sub_nscf_err ** 2 , [4 ])), jacob_vec ),
464
464
)
465
465
)
466
466
# compute std
@@ -501,7 +501,7 @@ def fmat_deriv_nscf(kk, ll, ik, il):
501
501
jval_err = jval_err + np .sum (
502
502
np .dot (
503
503
np .transpose (jacob_vec ),
504
- np .dot (np .diag (np .reshape (chi_sub_scf_err ** 2 , [4 ])), jacob_vec ),
504
+ np .dot (np .diag (np .reshape (chi_sub_scf_err ** 2 , [4 ])), jacob_vec ),
505
505
)
506
506
)
507
507
# nscf component
@@ -522,7 +522,7 @@ def fmat_deriv_nscf(kk, ll, ik, il):
522
522
jval_err = jval_err + np .sum (
523
523
np .dot (
524
524
np .transpose (jacob_vec ),
525
- np .dot (np .diag (np .reshape (chi_sub_nscf_err ** 2 , [4 ])), jacob_vec ),
525
+ np .dot (np .diag (np .reshape (chi_sub_nscf_err ** 2 , [4 ])), jacob_vec ),
526
526
)
527
527
)
528
528
# compute std
0 commit comments