From 7c1cff2cd5622d47e099da40ea494c855b53fcbd Mon Sep 17 00:00:00 2001 From: Kaushik Kulkarni Date: Fri, 14 Nov 2025 18:32:06 -0600 Subject: [PATCH 1/2] Use 'optimal' strategy for einsum contraction path. --- arraycontext/impl/numpy/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arraycontext/impl/numpy/__init__.py b/arraycontext/impl/numpy/__init__.py index 3aac1a9e..265d7a53 100644 --- a/arraycontext/impl/numpy/__init__.py +++ b/arraycontext/impl/numpy/__init__.py @@ -197,7 +197,7 @@ def tag_axis(self, return array def einsum(self, spec, *args, arg_names=None, tagged=()): - return np.einsum(spec, *args) + return np.einsum(spec, *args, optimize="optimal") @property def permits_inplace_modification(self): From 5245cd1942458bd8b3c581f8a58c102acc170adf Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Wed, 19 Nov 2025 10:46:43 -0600 Subject: [PATCH 2/2] Update baseline --- .basedpyright/baseline.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.basedpyright/baseline.json b/.basedpyright/baseline.json index 8aaa5228..f18796ab 100644 --- a/.basedpyright/baseline.json +++ b/.basedpyright/baseline.json @@ -2375,7 +2375,7 @@ "code": "reportCallIssue", "range": { "startColumn": 15, - "endColumn": 37, + "endColumn": 57, "lineCount": 1 } }, @@ -2383,7 +2383,7 @@ "code": "reportUnknownVariableType", "range": { "startColumn": 15, - "endColumn": 37, + "endColumn": 57, "lineCount": 1 } },