From e290506f141147f04d2cc74f3c0c6bb8a3e270a8 Mon Sep 17 00:00:00 2001 From: Jerry Date: Wed, 30 Oct 2024 21:05:52 -0400 Subject: [PATCH] Fixed linting from plot_utils --- bayesflow/utils/plot_utils.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bayesflow/utils/plot_utils.py b/bayesflow/utils/plot_utils.py index 402a61e0..08e75078 100644 --- a/bayesflow/utils/plot_utils.py +++ b/bayesflow/utils/plot_utils.py @@ -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." )