We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5055b0 commit c8d9015Copy full SHA for c8d9015
src/earthkit/meteo/stats/array/numpy_extended.py
@@ -37,7 +37,7 @@ def nanaverage(data, weights=None, **kwargs):
37
if weights is not None:
38
weights = xp.asarray(weights)
39
# set weights to nan where data is nan:
40
- this_weights = xp.ones(data.shape) * weights
+ this_weights = xp.ones_like(data) * weights
41
this_weights[xp.isnan(data)] = xp.nan
42
# Weights must be scaled to the sum of valid
43
# weights for each relevant axis:
0 commit comments