Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: lazy data docstring made clearer #2947

Merged
merged 2 commits into from
Feb 9, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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