diff --git a/.test-conda-env-py3.yml b/.test-conda-env-py3.yml index f336c9e94a3638652f794f6771e91ddc958e4354..a53d2c220b3ff0f3fe936d3ecfa59c7465281072 100644 --- a/.test-conda-env-py3.yml +++ b/.test-conda-env-py3.yml @@ -1,7 +1,7 @@ name: test-conda-env-py3 channels: - inducer -- symengine/label/dev +- symengine - conda-forge - defaults dependencies: @@ -12,5 +12,5 @@ dependencies: - islpy - pyopencl - python=3.5 -- python-symengine=0.2.0.53.g83912b7=py35_1 +- python-symengine=0.3.0 # things not in here: loopy boxtree pymbolic pyfmmlib diff --git a/sumpy/codegen.py b/sumpy/codegen.py index ab739e4f571de87cd02b7af76628455628ce8a4d..cb56a3c229c80adb753a8696e2ab44b803da40d2 100644 --- a/sumpy/codegen.py +++ b/sumpy/codegen.py @@ -69,9 +69,6 @@ class SympyToPymbolicMapper(SympyToPymbolicMapperBase): return expr elif getattr(expr, "is_Function", False): func_name = SympyToPymbolicMapperBase.function_name(self, expr) - # SymEngine capitalizes the names of the special functions. - if func_name.lower() in _SPECIAL_FUNCTION_NAMES: - func_name = func_name.lower() return prim.Variable(func_name)( *tuple(self.rec(arg) for arg in expr.args)) else: diff --git a/sumpy/symbolic.py b/sumpy/symbolic.py index 85dbb278eb88e82d753aee0f22b958a23bc67eba..93295bca64b2e5af09b793267b8825a6019f58a6 100644 --- a/sumpy/symbolic.py +++ b/sumpy/symbolic.py @@ -81,7 +81,7 @@ Add Basic Mul Pow exp sqrt symbols sympify cos sin atan2 Function Symbol Derivative Integer Matrix Subs I pi functions""".split() if USE_SYMENGINE: - from symengine import sympy_compat as sym + import symengine as sym from pymbolic.interop.symengine import ( PymbolicToSymEngineMapper as PymbolicToSympyMapper, SymEngineToPymbolicMapper as SympyToPymbolicMapper) diff --git a/sumpy/tools.py b/sumpy/tools.py index 56c32bf3dbd80ecabcb02a553097deb8e9d85161..f3398b9cb703839d8d4a824f76ddb917416fe606 100644 --- a/sumpy/tools.py +++ b/sumpy/tools.py @@ -387,7 +387,7 @@ class KernelCacheWrapper(object): def my_syntactic_subs(expr, subst_dict): # Workaround for differing substitution semantics between sympy and symengine. # FIXME: This is a hack. - from sumpy.symbolic import Basic, Subs, Derivative, USE_SYMENGINE + from sumpy.symbolic import Basic, Subs, Derivative if not isinstance(expr, Basic): return expr @@ -416,11 +416,7 @@ def my_syntactic_subs(expr, subst_dict): if new_expr != expr.expr or any(new_var != var for new_var, var in zip(new_variables, expr.variables)): - # FIXME in SymEngine - if USE_SYMENGINE: - return Derivative(new_expr, new_variables) - else: - return Derivative(new_expr, *new_variables) + return Derivative(new_expr, *new_variables) return expr diff --git a/test/test_cse.py b/test/test_cse.py index 4f957aaa5d20ef4b02d40a5b7c2052c4c6a5345a..8484ee47f92cdc6798f846ae9162d2d45ec0596f 100644 --- a/test/test_cse.py +++ b/test/test_cse.py @@ -220,8 +220,7 @@ def test_dont_cse_derivative(): from sumpy.symbolic import Derivative f = Function("f") - # FIXME - deriv = Derivative(f(x+y), (x,)) if USE_SYMENGINE else Derivative(f(x+y), x) + deriv = Derivative(f(x+y), x) name_val, (expr,) = cse(x + y + deriv)