From 54531ad6e44a32ed32098014b7cf4f3cea3fa0f8 Mon Sep 17 00:00:00 2001 From: Zhi Date: Fri, 21 Apr 2023 14:11:45 -0400 Subject: [PATCH] round up instead of round down --- pyro/util/plot_tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyro/util/plot_tools.py b/pyro/util/plot_tools.py index 6d997a126..b0ced77ce 100644 --- a/pyro/util/plot_tools.py +++ b/pyro/util/plot_tools.py @@ -55,8 +55,8 @@ def setup_axes(myg, num): else: # 2-d grid of plots - ny = int(math.sqrt(num)) - nx = num//ny + ny = math.ceil(math.sqrt(num)) + nx = math.ceil(num/ny) axes = ImageGrid(f, 111, nrows_ncols=(nx, ny),