From 98600d620fb84909266f2ce0c649396cacdc7bab Mon Sep 17 00:00:00 2001 From: Jon Thielen Date: Mon, 28 Sep 2020 10:03:18 -0500 Subject: [PATCH] Update docstring for mean_pressure_weighted and remove bad wrap_like usage --- src/metpy/calc/indices.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/metpy/calc/indices.py b/src/metpy/calc/indices.py index af1f1a8abd8..1fda8c50b36 100644 --- a/src/metpy/calc/indices.py +++ b/src/metpy/calc/indices.py @@ -78,7 +78,7 @@ def precipitable_water(pressure, dewpoint, *, bottom=None, top=None): @exporter.export -@preprocess_and_wrap(wrap_like=('pressure', 'pressure')) +@preprocess_and_wrap() @check_units('[pressure]') def mean_pressure_weighted(pressure, *args, height=None, bottom=None, depth=None): r"""Calculate pressure-weighted mean of an arbitrary variable through a layer. @@ -104,14 +104,14 @@ def mean_pressure_weighted(pressure, *args, height=None, bottom=None, depth=None Returns ------- - `pint.Quantity` - u_mean: u-component of layer mean wind. - `pint.Quantity` - v_mean: v-component of layer mean wind. + list of `pint.Quantity` + list of layer mean value for each profile in args Notes ----- Only functions on 1D profiles (not higher-dimension vertical cross sections or grids). + Since this function returns scalar values when given a profile, this will return Pint + Quantities even when given xarray DataArray profiles. """ ret = [] # Returned variable means in layer