From 21d88473c862fdd4da499d09cc90c72b92875583 Mon Sep 17 00:00:00 2001 From: Christopher Billingham Date: Wed, 5 Jul 2023 14:21:36 +0100 Subject: [PATCH] Simplify infinity check (#2587) --- openmc/universe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openmc/universe.py b/openmc/universe.py index 447746e576a..c490ac2989c 100644 --- a/openmc/universe.py +++ b/openmc/universe.py @@ -391,7 +391,7 @@ def plot(self, origin=None, width=None, pixels=40000, bb = self.bounding_box # checks to see if bounding box contains -inf or inf values - if np.isinf([bb[0][x], bb[1][x], bb[0][y], bb[1][y]]).any(): + if np.isinf(bb.extent[basis]).any(): if origin is None: origin = (0, 0, 0) if width is None: