From 9b52067a1ff90454327f4524ac0402c0cc895c68 Mon Sep 17 00:00:00 2001 From: Elias Sadek Date: Tue, 17 Dec 2024 11:39:14 +0000 Subject: [PATCH] cube data is optional --- lib/iris/cube.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/iris/cube.py b/lib/iris/cube.py index 902999b112..fe497ef228 100644 --- a/lib/iris/cube.py +++ b/lib/iris/cube.py @@ -1190,7 +1190,7 @@ def _walk_nodes(node): def __init__( self, - data: np.typing.ArrayLike, + data: np.typing.ArrayLike | None = None, standard_name: str | None = None, long_name: str | None = None, var_name: str | None = None, @@ -1251,6 +1251,9 @@ def __init__( A list of CellMeasures with dimension mappings. ancillary_variables_and_dims : A list of AncillaryVariables with dimension mappings. + shape : + An alternative to providing data, this defines the shape of the + cube, but initialises the cube as dataless. Examples --------