From 4ffb00e6a3864732f0a0b15bee5bfcdcd2654206 Mon Sep 17 00:00:00 2001 From: Christopher Billingham Date: Mon, 3 Jul 2023 09:59:17 +0100 Subject: [PATCH] Simplify infinity check --- 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: