File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -177,15 +177,15 @@ def exprs_dimensions(self):
177177 The Dimensions that appear explicitly in the Cluster expressions.
178178 """
179179 dims_explicit = {i for i in self .free_symbols if i .is_Dimension }
180- dims_implicit = set (). union ( * [ set ( e . implicit_dims ) for e in self .exprs ])
180+ dims_implicit = { d for e in self .exprs for d in e . implicit_dims }
181181 return dims_explicit | dims_implicit
182182
183183 @cached_property
184184 def guards_dimensions (self ):
185185 """
186186 The Dimensions that appear explicitly in the Cluster guards.
187187 """
188- syms_guards = set (). union ( * [ e . free_symbols for e in self .guards .values ()])
188+ syms_guards = { d for e in self .guards .values () for d in e . free_symbols }
189189 dims_guards = {i for i in syms_guards if i .is_Dimension }
190190 return dims_guards
191191
Original file line number Diff line number Diff line change @@ -151,9 +151,8 @@ def __mul__(self, other):
151151class Terminal :
152152
153153 """
154- Abstract base class for all terminal objects, that is, those objects
155- collected by `retrieve_terminals` in addition to all other SymPy atoms
156- such as `Symbol`, `Number`, etc.
154+ Abstract base class for special SymPy objects that can only appear as
155+ leaves (that is nodes with no children/arguments) in an expression.
157156 """
158157
159158 pass
@@ -553,10 +552,6 @@ class Reserved(Pickable):
553552 """
554553 A base class for all reserved words used throughout the lowering process,
555554 including the final stage of code generation itself.
556-
557- Reserved objects have the following properties:
558-
559- * `estimate_cost(o) = 0`, where `o` is an instance of Reserved
560555 """
561556
562557 pass
You can’t perform that action at this time.
0 commit comments