From b9c06cb89d1d188509089ea5847db8664e8bafca Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Thu, 14 May 2026 09:44:01 +0300 Subject: [PATCH] fix: remove redundant flatten in Brinkman kernels --- sumpy/kernel.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/sumpy/kernel.py b/sumpy/kernel.py index 236d3b58..5fbb99d2 100644 --- a/sumpy/kernel.py +++ b/sumpy/kernel.py @@ -1199,11 +1199,7 @@ def __init__(self, else: raise NotImplementedError(f"unsupported dimension: '{dim}'") - from pymbolic.mapper.flattener import flatten - - super().__init__(dim, - expression=flatten(expr), - global_scaling_const=flatten(scaling)) + super().__init__(dim, expression=expr, global_scaling_const=scaling) object.__setattr__(self, "icomp", icomp) object.__setattr__(self, "jcomp", jcomp) @@ -1339,11 +1335,7 @@ def __init__(self, else: raise NotImplementedError(f"unsupported dimension: '{dim}'") - from pymbolic.mapper.flattener import flatten - - super().__init__(dim, - expression=flatten(expr), - global_scaling_const=flatten(scaling)) + super().__init__(dim, expression=expr, global_scaling_const=scaling) object.__setattr__(self, "icomp", icomp) object.__setattr__(self, "jcomp", jcomp)