fix: Take first element of solution list

This commit is contained in:
Deepak Mallubhotla 2022-02-06 19:28:54 -06:00
parent 6ada52f82c
commit 3534593557
Signed by: deepak
GPG Key ID: BEBAEBF28083E022

View File

@ -91,7 +91,7 @@ class Diagnostic():
bounds = discretisation.bounds(idx)
actual_success = result.success and result.cost <= 1e-10
diag_row = SingleDipoleDiagnostic(name, idx, bounds, self.dipoles.dipoles[0], discretisation.model.solution_as_dipoles(result.normalised_x), actual_success)
diag_row = SingleDipoleDiagnostic(name, idx, bounds, self.dipoles.dipoles[0], discretisation.model.solution_as_dipoles(result.normalised_x)[0], actual_success)
row = vars(diag_row)
_logger.debug(f"Writing result {row}")
writer.writerow(row)