From abb4578c67f1f33d180253c2dabd2c5a15baef4e Mon Sep 17 00:00:00 2001 From: "G. D. McBain" Date: Wed, 2 Feb 2022 16:57:08 +1100 Subject: [PATCH] elide intermediate variable --- skfem/mesh/mesh.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/skfem/mesh/mesh.py b/skfem/mesh/mesh.py index 1b1056ad6..f95b5a161 100644 --- a/skfem/mesh/mesh.py +++ b/skfem/mesh/mesh.py @@ -258,8 +258,11 @@ def _decode_cell_data(self, cell_data: Dict[str, List[ndarray]]): subdomains[subnames[2]] = np.nonzero(data[0])[0] elif subnames[1] == "b": oriented = data[0].max() > 2 ** self.t2f.shape[0] - 1 - powers = 1 << np.arange(self.t2f.shape[0] * (1 + oriented))[:, None] - indices = powers & data[0].astype(np.int64) > 0 + indices = ( + 1 << np.arange(self.t2f.shape[0] * (1 + oriented))[:, None] + & data[0].astype(np.int64) + > 0 + ) if oriented: oriented_facets = ( self.t2f[indices[: self.t2f.shape[0]]],