From c5786c05ec4ae789a9894b9b7c58ebb2a5ad2b78 Mon Sep 17 00:00:00 2001 From: saidctb Date: Thu, 23 Jan 2020 19:12:43 +0100 Subject: [PATCH] treat object of class Idx in SymbolicExpr --- sympde/topology/mapping.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sympde/topology/mapping.py b/sympde/topology/mapping.py index b7901859..4d5a8720 100644 --- a/sympde/topology/mapping.py +++ b/sympde/topology/mapping.py @@ -2,7 +2,7 @@ from collections import OrderedDict -from sympy import Indexed, IndexedBase, Matrix, ImmutableDenseMatrix +from sympy import Indexed, IndexedBase, Idx, Matrix, ImmutableDenseMatrix from sympy import Function from sympy import sympify from sympy.core import Basic @@ -851,6 +851,9 @@ def eval(cls, *_args, **kwargs): elif isinstance(expr, Indexed): return expr + elif isinstance(expr, Idx): + return expr + elif isinstance(expr, Function): return expr