From 5ff869f6bc0af2036d3d9f801fe7709588be3325 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 7 Dec 2020 18:28:42 -0600 Subject: [PATCH] Stop using pytools.{any,all} --- pymbolic/geometric_algebra/__init__.py | 2 -- pymbolic/mapper/evaluator.py | 2 -- 2 files changed, 4 deletions(-) diff --git a/pymbolic/geometric_algebra/__init__.py b/pymbolic/geometric_algebra/__init__.py index ddd4db7..1258b18 100644 --- a/pymbolic/geometric_algebra/__init__.py +++ b/pymbolic/geometric_algebra/__init__.py @@ -213,7 +213,6 @@ class Space(object): if metric_matrix is None: metric_matrix = np.eye(len(basis), dtype=np.object) - from pytools import all if not ( len(metric_matrix.shape) == 2 and all(dim == len(basis) for dim in metric_matrix.shape)): @@ -560,7 +559,6 @@ class MultiVector(object): # }}} # assert that multivectors don't get nested - from pytools import any assert not any(isinstance(coeff, MultiVector) for coeff in six.itervalues(data)) diff --git a/pymbolic/mapper/evaluator.py b/pymbolic/mapper/evaluator.py index f4fc308..4189b3c 100644 --- a/pymbolic/mapper/evaluator.py +++ b/pymbolic/mapper/evaluator.py @@ -129,11 +129,9 @@ class EvaluationMapper(RecursiveMapper, CSECachingMapperMixin): return not self.rec(expr.child) def map_logical_or(self, expr): - from pytools import any return any(self.rec(ch) for ch in expr.children) def map_logical_and(self, expr): - from pytools import all return all(self.rec(ch) for ch in expr.children) def map_polynomial(self, expr): -- GitLab