diff --git a/backends/cbackend.py b/backends/cbackend.py index 76eb3ee747ac07de4944ce9cda5a02227d94da78..00da70f27df4f8d0a6fddbdd211bd12f2858c7fd 100644 --- a/backends/cbackend.py +++ b/backends/cbackend.py @@ -272,6 +272,7 @@ class CustomSympyPrinter(CCodePrinter): else: return res + # noinspection PyPep8Naming class VectorizedCustomSympyPrinter(CustomSympyPrinter): SummandInfo = namedtuple("SummandInfo", ['sign', 'term']) diff --git a/transformations.py b/transformations.py index ab7d98ab51a7207e31c39ccd81e8e05f1d12b029..d108b7011c1e4582b966b928820cf0d491d060b9 100644 --- a/transformations.py +++ b/transformations.py @@ -721,6 +721,8 @@ class KernelConstraintsCheck: elif isinstance(rhs, sp.Mul): new_args = [self.process_expression(arg) if arg not in (-1, 1) else arg for arg in rhs.args] return rhs.func(*new_args) if new_args else rhs + elif isinstance(rhs, sp.Indexed): + return rhs else: if isinstance(rhs, sp.Pow): # don't process exponents -> they should remain integers