Skip to content

Commit 656015e

Browse files
DPeterKpelson
authored andcommitted
DOC: lazy data docstring made clearer (#2947)
* DOC: lazy data docstring made clearer * Clarify "view"
1 parent ab529c3 commit 656015e

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

lib/iris/cube.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1588,17 +1588,22 @@ def ndim(self):
15881588

15891589
def lazy_data(self):
15901590
"""
1591-
Return a lazy array representing the Cube data.
1591+
Return a "lazy array" representing the Cube data. A lazy array
1592+
describes an array whose data values have not been loaded into memory
1593+
from disk.
15921594
1593-
Accessing this method will never cause the data to be loaded.
1595+
Accessing this method will never cause the Cube data to be loaded.
15941596
Similarly, calling methods on, or indexing, the returned Array
1595-
will not cause the Cube to have loaded data.
1597+
will not cause the Cube data to be loaded.
15961598
1597-
If the data have already been loaded for the Cube, the returned
1598-
Array will be a new lazy array wrapper.
1599+
If the Cube data have already been loaded (for example by calling
1600+
:meth:`~iris.cube.Cube.data`), the returned Array will be a view of the
1601+
loaded cube data represented as a lazy array object. Note that this
1602+
does _not_ make the Cube data lazy again; the Cube data remains loaded
1603+
in memory.
15991604
16001605
Returns:
1601-
A lazy array, representing the Cube data array.
1606+
A lazy array, representing the Cube data.
16021607
16031608
"""
16041609
return self._data_manager.lazy_data()

0 commit comments

Comments
 (0)