From 656015e093d8e444d52aa60f889f26bb04a78531 Mon Sep 17 00:00:00 2001 From: Peter Killick Date: Fri, 9 Feb 2018 09:38:18 +0000 Subject: [PATCH] DOC: lazy data docstring made clearer (#2947) * DOC: lazy data docstring made clearer * Clarify "view" --- lib/iris/cube.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/iris/cube.py b/lib/iris/cube.py index 14459eb28f..70ee6325f5 100644 --- a/lib/iris/cube.py +++ b/lib/iris/cube.py @@ -1588,17 +1588,22 @@ def ndim(self): def lazy_data(self): """ - Return a lazy array representing the Cube data. + Return a "lazy array" representing the Cube data. A lazy array + describes an array whose data values have not been loaded into memory + from disk. - Accessing this method will never cause the data to be loaded. + Accessing this method will never cause the Cube data to be loaded. Similarly, calling methods on, or indexing, the returned Array - will not cause the Cube to have loaded data. + will not cause the Cube data to be loaded. - If the data have already been loaded for the Cube, the returned - Array will be a new lazy array wrapper. + If the Cube data have already been loaded (for example by calling + :meth:`~iris.cube.Cube.data`), the returned Array will be a view of the + loaded cube data represented as a lazy array object. Note that this + does _not_ make the Cube data lazy again; the Cube data remains loaded + in memory. Returns: - A lazy array, representing the Cube data array. + A lazy array, representing the Cube data. """ return self._data_manager.lazy_data()