From 081714baf4476b42ca75a1324377914dd6356965 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Fri, 17 Feb 2017 11:36:43 -0600 Subject: [PATCH] IdentityMapper.map_numpy_array: pass along extra arguments --- pymbolic/mapper/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pymbolic/mapper/__init__.py b/pymbolic/mapper/__init__.py index 6db6da5..cdd4ba6 100644 --- a/pymbolic/mapper/__init__.py +++ b/pymbolic/mapper/__init__.py @@ -434,12 +434,12 @@ class IdentityMapper(Mapper): def map_tuple(self, expr, *args, **kwargs): return tuple(self.rec(child, *args, **kwargs) for child in expr) - def map_numpy_array(self, expr): + def map_numpy_array(self, expr, *args, **kwargs): import numpy result = numpy.empty(expr.shape, dtype=object) from pytools import indices_in_shape for i in indices_in_shape(expr.shape): - result[i] = self.rec(expr[i]) + result[i] = self.rec(expr[i], *args, **kwargs) return result def map_multivector(self, expr, *args, **kwargs): -- GitLab