Skip to content

Commit

Permalink
add note about NEP13/18 not applying
Browse files Browse the repository at this point in the history
  • Loading branch information
rcomer committed Nov 23, 2022
1 parent e7451ca commit 2be06cb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/iris/analysis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1590,6 +1590,10 @@ def _rms(array, axis, **kwargs):


def _lazy_rms(array, axis, **kwargs):
# Note that, since we specifically need the ma version of average to handle
# weights correctly with masked data, we cannot rely on NEP13/18 and need
# to implement a separate lazy RMS function.

rval = da.sqrt(da.ma.average(array**2, axis=axis, **kwargs))

return rval
Expand Down

0 comments on commit 2be06cb

Please sign in to comment.