Skip to content

Commit

Permalink
style: pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Jul 3, 2024
1 parent 300c6c7 commit 0cad055
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 11 deletions.
1 change: 0 additions & 1 deletion pybop/costs/fitting_costs.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,6 @@ def _evaluate(self, inputs: Inputs, grad=None):
log_likelihood = self.likelihood._evaluate(inputs)
log_prior = sum(
self.parameters[key].prior.logpdf(value) for key, value in inputs.items()

)

posterior = log_likelihood + log_prior
Expand Down
2 changes: 1 addition & 1 deletion pybop/parameters/parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def as_dict(self, values=None) -> Dict:
values = self.true_value()
return {key: values[i] for i, key in enumerate(self.param.keys())}

def verify(self, inputs: Union[Inputs, None]=None):
def verify(self, inputs: Union[Inputs, None] = None):
"""
Verify that the inputs are an Inputs dictionary or numeric values
which can be used to construct an Inputs dictionary
Expand Down
4 changes: 1 addition & 3 deletions tests/integration/test_optimisation_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,5 @@ def get_data(self, model, parameters, x, init_soc):
]
* 2
)
sim = model.predict(
init_soc=init_soc, experiment=experiment, inputs=x
)
sim = model.predict(init_soc=init_soc, experiment=experiment, inputs=x)
return sim
4 changes: 1 addition & 3 deletions tests/integration/test_spm_parameterisations.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,5 @@ def get_data(self, model, parameters, x, init_soc):
]
* 2
)
sim = model.predict(
init_soc=init_soc, experiment=experiment, inputs=x
)
sim = model.predict(init_soc=init_soc, experiment=experiment, inputs=x)
return sim
4 changes: 1 addition & 3 deletions tests/unit/test_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,7 @@ def test_problem_construct_with_model_predict(
):
# Construct model and predict
model.parameters = parameters
out = model.predict(
inputs=[1e-5, 1e-5], t_eval=np.linspace(0, 10, 100)
)
out = model.predict(inputs=[1e-5, 1e-5], t_eval=np.linspace(0, 10, 100))

problem = pybop.FittingProblem(
model, parameters, dataset=dataset, signal=signal
Expand Down

0 comments on commit 0cad055

Please sign in to comment.