From f95007d354b6e908f700ddf300d10162ce4388c0 Mon Sep 17 00:00:00 2001 From: mloubout Date: Fri, 25 Oct 2024 14:28:09 -0400 Subject: [PATCH] api: fix corner case in precomputerd --- devito/types/sparse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devito/types/sparse.py b/devito/types/sparse.py index dc6c225695..3e65800fbf 100644 --- a/devito/types/sparse.py +++ b/devito/types/sparse.py @@ -1153,7 +1153,7 @@ def __init_finalize__(self, *args, **kwargs): if r <= 0: raise ValueError('`r` must be > 0') # Make sure radius matches the coefficients size - if any(c in kwargs for c in ckeys): + if any(c in kwargs for c in ckeys) and self._interpolation_coeffs is not None: nr = self._interpolation_coeffs.shape[-1] if nr // 2 != r: if nr == r: