Skip to content

Commit 919611f

Browse files
kpentlandkpentland
authored andcommitted
black
1 parent c44f438 commit 919611f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

freegsnke/inverse.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,9 @@ def optimize_currents(self, full_currents_vec, trial_plasma_psi, l2_reg):
398398
reg_matrix = l2_reg * np.eye(self.n_control_coils)
399399
else:
400400
if len(l2_reg) != self.n_control_coils:
401-
raise ValueError(f"Expected l2_reg to have length equal to number of coils being controlled ({self.n_control_coils}), but got {len(l2_reg)}.")
401+
raise ValueError(
402+
f"Expected l2_reg to have length equal to number of coils being controlled ({self.n_control_coils}), but got {len(l2_reg)}."
403+
)
402404
reg_matrix = np.diag(l2_reg)
403405
mat = np.linalg.inv(np.matmul(self.A.T, self.A) + reg_matrix)
404406
delta_current = np.dot(mat, np.dot(self.A.T, self.b))

0 commit comments

Comments
 (0)