From 514ab1b0ca8490dd8a4a95d8fa1fca3627ccd493 Mon Sep 17 00:00:00 2001 From: Fabio Luporini Date: Mon, 11 Mar 2024 13:53:22 +0000 Subject: [PATCH] compiler: Tweak Weights.value --- devito/finite_differences/differentiable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devito/finite_differences/differentiable.py b/devito/finite_differences/differentiable.py index c6adfa50d4..64d850f317 100644 --- a/devito/finite_differences/differentiable.py +++ b/devito/finite_differences/differentiable.py @@ -745,7 +745,7 @@ def value(self, idx): except TypeError: # E.g., `idx` is a tuple v = self._npweights[idx] - if v.is_Number: + if v.is_Number or v.is_Indexed: return sympy.sympify(v) else: return self[idx]