Skip to content

Commit

Permalink
Fixed linting from plot_utils
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrymhuang committed Oct 31, 2024
1 parent 35267fe commit e290506
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions bayesflow/utils/plot_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,28 @@ def check_posterior_prior_shapes(post_samples, prior_samples):

if len(post_samples.shape) != 3:
raise ShapeError(
f"post_samples should be a 3-dimensional array, with the "
+ f"first dimension being the number of (simulated) data sets, "
+ f"the second dimension being the number of posterior draws per data set, "
+ f"and the third dimension being the number of parameters (marginal distributions), "
"post_samples should be a 3-dimensional array, with the "
+ "first dimension being the number of (simulated) data sets, "
+ "the second dimension being the number of posterior draws per data set, "
+ "and the third dimension being the number of parameters (marginal distributions), "
+ f"but your input has dimensions {len(post_samples.shape)}"
)
elif len(prior_samples.shape) != 2:
raise ShapeError(
f"prior_samples should be a 2-dimensional array, with the "
+ f"first dimension being the number of (simulated) data sets / prior draws "
+ f"and the second dimension being the number of parameters (marginal distributions), "
"prior_samples should be a 2-dimensional array, with the "
+ "first dimension being the number of (simulated) data sets / prior draws "
+ "and the second dimension being the number of parameters (marginal distributions), "
+ f"but your input has dimensions {len(prior_samples.shape)}"
)
elif post_samples.shape[0] != prior_samples.shape[0]:
raise ShapeError(
f"The number of elements over the first dimension of post_samples and prior_samples"
"The number of elements over the first dimension of post_samples and prior_samples"
+ f"should match, but post_samples has {post_samples.shape[0]} and prior_samples has "
+ f"{prior_samples.shape[0]} elements, respectively."
)
elif post_samples.shape[-1] != prior_samples.shape[-1]:
raise ShapeError(
f"The number of elements over the last dimension of post_samples and prior_samples"
"The number of elements over the last dimension of post_samples and prior_samples"
+ f"should match, but post_samples has {post_samples.shape[1]} and prior_samples has "
+ f"{prior_samples.shape[-1]} elements, respectively."
)
Expand Down

0 comments on commit e290506

Please sign in to comment.