From 3bdad69cfd4702e04e2f9179c64ff3a962a30b9c Mon Sep 17 00:00:00 2001 From: Addison Alvey-Blanco Date: Sat, 10 Feb 2024 09:59:47 -0600 Subject: [PATCH] Dict -> Mapping --- pytato/transform/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pytato/transform/__init__.py b/pytato/transform/__init__.py index 8934a2d75..e66d89f90 100644 --- a/pytato/transform/__init__.py +++ b/pytato/transform/__init__.py @@ -474,9 +474,9 @@ def rec_idx_or_size_tuple(self, situp: Tuple[IndexOrShapeExpr, ...], def map_index_lambda(self, expr: IndexLambda, *args: Any, **kwargs: Any) -> Array: - bindings: Dict[str, Array] = { - name: self.rec(subexpr, *args, **kwargs) - for name, subexpr in sorted(expr.bindings.items())} + bindings: Mapping[str, Array] = immutabledict({ + name: self.rec(subexpr) + for name, subexpr in sorted(expr.bindings.items())}) return IndexLambda(expr=expr.expr, shape=self.rec_idx_or_size_tuple(expr.shape, *args, **kwargs),