From 9574f77be128f27bab3444d0a8d18baf2b2cc325 Mon Sep 17 00:00:00 2001 From: Magdalena Luz Date: Fri, 30 Sep 2022 15:33:38 +0200 Subject: [PATCH] calling constant_field from zero_field --- testutils/src/icon4py/testutils/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/testutils/src/icon4py/testutils/utils.py b/testutils/src/icon4py/testutils/utils.py index d262e8cc39..4766597d51 100644 --- a/testutils/src/icon4py/testutils/utils.py +++ b/testutils/src/icon4py/testutils/utils.py @@ -49,9 +49,7 @@ def random_field( def zero_field( mesh: simple_mesh.SimpleMesh, *dims: gt_common.Dimension, dtype=float ) -> it_embedded.MutableLocatedField: - return it_embedded.np_as_located_field(*dims)( - np.zeros(shape=tuple(map(lambda x: mesh.size[x], dims)), dtype=dtype) - ) + return constant_field(mesh, 0.0, *dims, dtype=dtype) def constant_field(