Skip to content

Commit 5860321

Browse files
committed
Update min_weight parameter description for simplicity and conciseness
1 parent 6490e6c commit 5860321

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

xcdat/spatial.py

+12-9
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,10 @@ def average(
131131
than the upper bound (e.g., across the prime meridian, dateline), by
132132
default None.
133133
min_weight : optional, float
134-
Fraction of data coverage (i.e, weight) needed to return a
135-
spatial average value. Value must range from 0 to 1, by default None
136-
(equivalent to ``min_weight=0.0``). This parameter is useful for
137-
cases where the weighting of data might be skewed based on the
138-
availability of data.
134+
Minimum fraction of data coverage (weight) required to compute a
135+
spatial average. Must be between 0 and 1. Useful for ensuring
136+
accurate averages in regions with missing data, by default None
137+
(equivalent to 0.0).
139138
140139
Returns
141140
-------
@@ -738,8 +737,10 @@ def _averager(
738737
axis : List[SpatialAxis] | Tuple[SpatialAxis, ...]
739738
List of axis dimensions to average over.
740739
min_weight : float
741-
Fraction of data coverage (i.e, weight) needed to return a
742-
spatial average value. Value must range from 0 to 1.
740+
Minimum fraction of data coverage (weight) required to compute a
741+
spatial average. Must be between 0 and 1. Useful for ensuring
742+
accurate averages in regions with missing data, by default None
743+
(equivalent to 0.0).
743744
744745
Returns
745746
-------
@@ -798,8 +799,10 @@ def _mask_var_with_weight_threshold(
798799
averaging. ``weights`` must include the same axis dimensions and
799800
dimensional sizes as the data variable.
800801
min_weight : float
801-
Fraction of data coverage (i.e, weight) needed to return a
802-
spatial average value. Value must range from 0 to 1.
802+
Minimum fraction of data coverage (weight) required to compute a
803+
spatial average. Must be between 0 and 1. Useful for ensuring
804+
accurate averages in regions with missing data, by default None
805+
(equivalent to 0.0).
803806
804807
Returns
805808
-------

0 commit comments

Comments
 (0)