From 478835adbe0408a104304094274f0dba0df17ebb Mon Sep 17 00:00:00 2001 From: nfarabullini Date: Wed, 13 Mar 2024 14:21:38 +0100 Subject: [PATCH 1/2] . --- docs/user/next/QuickstartGuide.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/user/next/QuickstartGuide.md b/docs/user/next/QuickstartGuide.md index 98553af133..6b850c0859 100644 --- a/docs/user/next/QuickstartGuide.md +++ b/docs/user/next/QuickstartGuide.md @@ -38,6 +38,7 @@ The concepts are demonstrated through a simple application that adds two fields. +++ + #### Importing features The following snippet imports the most commonly used features that are needed to run the code in this document. Numpy is also required by the examples. From 81bb43248324902fd03fc1b2ca7bb8dc7d407282 Mon Sep 17 00:00:00 2001 From: nfarabullini Date: Wed, 13 Mar 2024 14:26:17 +0100 Subject: [PATCH 2/2] small fix from merge --- docs/user/next/QuickstartGuide.md | 1 - src/gt4py/next/embedded/operators.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/user/next/QuickstartGuide.md b/docs/user/next/QuickstartGuide.md index 6b850c0859..98553af133 100644 --- a/docs/user/next/QuickstartGuide.md +++ b/docs/user/next/QuickstartGuide.md @@ -38,7 +38,6 @@ The concepts are demonstrated through a simple application that adds two fields. +++ - #### Importing features The following snippet imports the most commonly used features that are needed to run the code in this document. Numpy is also required by the examples. diff --git a/src/gt4py/next/embedded/operators.py b/src/gt4py/next/embedded/operators.py index d1dc20e8f4..0982024090 100644 --- a/src/gt4py/next/embedded/operators.py +++ b/src/gt4py/next/embedded/operators.py @@ -191,7 +191,7 @@ def _tuple_at( ) -> core_defs.Scalar | tuple[core_defs.ScalarT | tuple, ...]: @utils.tree_map def impl(field: common.Field | core_defs.Scalar) -> core_defs.Scalar: - res = field[pos] if common.is_field(field) else field + res = field[pos].as_scalar() if common.is_field(field) else field assert core_defs.is_scalar_type(res) return res