Skip to content

Commit 4520590

Browse files
corinnebosleybjlittle
authored andcommitted
added note about laziness of operations to statistical functions (#3293)
added note about laziness of operations to statistical functions
1 parent 7440781 commit 4520590

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/iris/analysis/stats.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# (C) British Crown Copyright 2013 - 2015, Met Office
1+
# (C) British Crown Copyright 2013 - 2019, Met Office
22
#
33
# This file is part of Iris.
44
#
@@ -31,6 +31,8 @@
3131
def _ones_like(cube):
3232
"""
3333
Return a copy of cube with the same mask, but all data values set to 1.
34+
35+
The operation is non-lazy.
3436
"""
3537
ones_cube = cube.copy()
3638
ones_cube.data = np.ones_like(cube.data)
@@ -85,6 +87,8 @@ def pearsonr(cube_a, cube_b, corr_coords=None, weights=None, mdtol=1.,
8587
Reference:
8688
http://www.statsoft.com/textbook/glosp.html#Pearson%20Correlation
8789
90+
This operation is non-lazy.
91+
8892
"""
8993

9094
# Assign larger cube to cube_1

0 commit comments

Comments
 (0)