Skip to content

Commit 1e8997c

Browse files
style: pre-commit fixes
1 parent d422d84 commit 1e8997c

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

pybamm/solvers/idaklu_solver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ def _integrate(self, model, t_eval, inputs_dict=None):
533533

534534
# return sensitivity solution, we need to flatten yS to
535535
# (#timesteps * #states (where t is changing the quickest),) to match format used by Solution
536-
# note that yS is (n_p, n_t, n_y)
536+
# note that yS is (n_p, n_t, n_y)
537537
if number_of_sensitivity_parameters != 0:
538538
yS_out = {
539539
name: sol.yS[i].reshape(-1, 1)
@@ -543,7 +543,7 @@ def _integrate(self, model, t_eval, inputs_dict=None):
543543
yS_out["all"] = np.hstack([yS_out[name] for name in sensitivity_names])
544544
else:
545545
yS_out = False
546-
546+
547547
if sol.flag in [0, 2]:
548548
# 0 = solved for all t_eval
549549
if sol.flag == 0:

tests/unit/test_solvers/test_idaklu_solver.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,11 +251,10 @@ def test_ida_roberts_klu_sensitivities(self):
251251
dyda_fd = dyda_fd.transpose().reshape(-1, 1)
252252

253253
np.testing.assert_array_almost_equal(dyda_ida, dyda_fd)
254-
254+
255255
# get the sensitivities for the variable
256256
d2uda = sol["2u"].sensitivities["a"]
257257
np.testing.assert_array_almost_equal(2 * dyda_ida[0:200:2], d2uda)
258-
259258

260259
def test_sensitivities_with_events(self):
261260
# this test implements a python version of the ida Roberts

0 commit comments

Comments
 (0)