Simplify infinity check (#2587)

This commit is contained in:
Christopher Billingham 2023-07-05 14:21:36 +01:00 committed by GitHub
parent 382bcb2e8e
commit 21d88473c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -391,7 +391,7 @@ class Universe(UniverseBase):
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: