Skip to content
Snippets Groups Projects

Make subexpressions optional for constructing an AssignmentCollection

Merged Stephan Seitz requested to merge seitz/pystencils:make-subexpressions-optional into master
1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
  • When introducing new people to pystencils it's often simpler not to
    differentiate between `main_assignments` and `subexpressions` in the
    beginning.
    Also for simple kernels subexpressions are often not needed, since
    intermediate symbols can also be set in main_assignments.
    
    Subexpression should be kept for expert users.
@@ -28,7 +28,7 @@ class AssignmentCollection:
# ------------------------------- Creation & Inplace Manipulation --------------------------------------------------
def __init__(self, main_assignments: Union[List[Assignment], Dict[sp.Expr, sp.Expr]],
subexpressions: Union[List[Assignment], Dict[sp.Expr, sp.Expr]],
subexpressions: Union[List[Assignment], Dict[sp.Expr, sp.Expr]] = {},
simplification_hints: Optional[Dict[str, Any]] = None,
subexpression_symbol_generator: Iterator[sp.Symbol] = None) -> None:
if isinstance(main_assignments, Dict):
Loading