From 1cd146491d92424c1e857cbe3a4ac62c0654c9eb Mon Sep 17 00:00:00 2001 From: Guy Moss Date: Sat, 18 Jan 2025 20:04:26 +0100 Subject: [PATCH] ruff formatting version change --- sbi/inference/potentials/score_based_potential.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sbi/inference/potentials/score_based_potential.py b/sbi/inference/potentials/score_based_potential.py index db0413f93..cbc1df73f 100644 --- a/sbi/inference/potentials/score_based_potential.py +++ b/sbi/inference/potentials/score_based_potential.py @@ -86,9 +86,9 @@ def set_x( x_density_estimator = reshape_to_batch_event( self.x_o, event_shape=self.score_estimator.condition_shape ) - assert ( - x_density_estimator.shape[0] == 1 - ), "PosteriorScoreBasedPotential supports only x batchsize of 1`." + assert x_density_estimator.shape[0] == 1, ( + "PosteriorScoreBasedPotential supports only x batchsize of 1`." + ) # For large number of evals, we want a high-tolerance flow. # This flow will be used mainly for MAP calculations, hence we want to save # it instead of rebuilding it every time. @@ -128,9 +128,9 @@ def __call__( x_density_estimator = reshape_to_batch_event( self.x_o, event_shape=self.score_estimator.condition_shape ) - assert ( - x_density_estimator.shape[0] == 1 - ), "PosteriorScoreBasedPotential supports only x batchsize of 1`." + assert x_density_estimator.shape[0] == 1, ( + "PosteriorScoreBasedPotential supports only x batchsize of 1`." + ) flow = self.get_continuous_normalizing_flow( condition=x_density_estimator, atol=atol, rtol=rtol, exact=exact