Skip to content

Commit

Permalink
DOC: lazy data docstring made clearer (#2947)
Browse files Browse the repository at this point in the history
* DOC: lazy data docstring made clearer

* Clarify "view"
  • Loading branch information
DPeterK authored and pelson committed Feb 9, 2018
1 parent ab529c3 commit 656015e
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions lib/iris/cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 656015e

Please sign in to comment.