Skip to content

Commit 2207e94

Browse files
committed
Fix Code Style
1 parent 3b761b2 commit 2207e94

File tree

5 files changed

+8
-9
lines changed

5 files changed

+8
-9
lines changed

bayesflow/diagnostics/metrics/posterior_contraction.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ def posterior_contraction(
7777
estimates = updated_data["estimates"]
7878
targets = updated_data["targets"]
7979

80-
8180
samples = dicts_to_arrays(
8281
estimates=estimates,
8382
targets=targets,

bayesflow/diagnostics/plots/recovery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from bayesflow.utils.numpy_utils import credible_interval
88
from bayesflow.utils.dict_utils import compute_test_quantities
99

10+
1011
def recovery(
1112
estimates: Mapping[str, np.ndarray] | np.ndarray,
1213
targets: Mapping[str, np.ndarray] | np.ndarray,
@@ -131,7 +132,6 @@ def recovery(
131132
estimates = updated_data["estimates"]
132133
targets = updated_data["targets"]
133134

134-
135135
# Gather plot data and metadata into a dictionary
136136
plot_data = prepare_plot_data(
137137
estimates=estimates,

bayesflow/diagnostics/plots/z_score_contraction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from bayesflow.utils import prepare_plot_data, add_titles_and_labels, prettify_subplots
77
from bayesflow.utils.dict_utils import compute_test_quantities
88

9+
910
def z_score_contraction(
1011
estimates: Mapping[str, np.ndarray] | np.ndarray,
1112
targets: Mapping[str, np.ndarray] | np.ndarray,
@@ -117,7 +118,6 @@ def z_score_contraction(
117118
estimates = updated_data["estimates"]
118119
targets = updated_data["targets"]
119120

120-
121121
# Gather plot data and metadata into a dictionary
122122
plot_data = prepare_plot_data(
123123
estimates=estimates,

tests/test_links/test_links.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ def check_ordering(output, axis):
2323
assert np.all(np.diff(output, axis=axis) > 0), f"is not ordered along specified axis: {axis}."
2424
for i in range(output.ndim):
2525
if i != axis % output.ndim:
26-
assert not np.all(np.diff(output, axis=i) > 0), (
27-
f"is ordered along axis which is not meant to be ordered: {i}."
28-
)
26+
assert not np.all(
27+
np.diff(output, axis=i) > 0
28+
), f"is ordered along axis which is not meant to be ordered: {i}."
2929

3030

3131
@pytest.mark.parametrize("axis", [0, 1, 2])

tests/test_networks/test_point_inference_network/test_point_inference_network.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ def test_save_and_load(tmp_path, point_inference_network, random_samples, random
4444

4545
for key_outer in out1.keys():
4646
for key_inner in out1[key_outer].keys():
47-
assert keras.ops.all(keras.ops.isclose(out1[key_outer][key_inner], out2[key_outer][key_inner])), (
48-
"Output of original and loaded model differs significantly."
49-
)
47+
assert keras.ops.all(
48+
keras.ops.isclose(out1[key_outer][key_inner], out2[key_outer][key_inner])
49+
), "Output of original and loaded model differs significantly."
5050

5151

5252
def test_copy_unequal(point_inference_network, random_samples, random_conditions):

0 commit comments

Comments
 (0)