From cbec92c98edf1975da3d4b9da30ad3a05f3d2385 Mon Sep 17 00:00:00 2001 From: Ruth Comer Date: Wed, 20 Jan 2021 14:22:35 +0000 Subject: [PATCH 1/2] remove warning for convert_units on lazy data --- lib/iris/cube.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/iris/cube.py b/lib/iris/cube.py index 40f5fbcef3..cc91c43544 100644 --- a/lib/iris/cube.py +++ b/lib/iris/cube.py @@ -981,10 +981,6 @@ def convert_units(self, unit): celsius and subtract 273.15 from each value in :attr:`~iris.cube.Cube.data`. - .. warning:: - Calling this method will trigger any deferred loading, causing - the cube's data array to be loaded into memory. - """ # If the cube has units convert the data. if self.units.is_unknown(): From 77648d86fd40ef0593e47f5eb7931993335256dd Mon Sep 17 00:00:00 2001 From: Ruth Comer Date: Wed, 20 Jan 2021 14:45:51 +0000 Subject: [PATCH 2/2] add note confirming lazy function --- lib/iris/cube.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/iris/cube.py b/lib/iris/cube.py index cc91c43544..c3f77c9288 100644 --- a/lib/iris/cube.py +++ b/lib/iris/cube.py @@ -981,6 +981,8 @@ def convert_units(self, unit): celsius and subtract 273.15 from each value in :attr:`~iris.cube.Cube.data`. + This operation preserves lazy data. + """ # If the cube has units convert the data. if self.units.is_unknown():