We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7b71866 commit 6d84b83Copy full SHA for 6d84b83
code/climate_cube_math/stats/anomalies.py
@@ -18,7 +18,7 @@ def zscore_over_time(
18
eps = STD_EPS if std_eps is None else std_eps
19
mean = da.mean(dim=dim, skipna=True)
20
std = da.std(dim=dim, skipna=True)
21
- valid_std = std > eps
+ valid_std = (std > eps).broadcast_like(da)
22
z = xr.where(valid_std, (da - mean) / std, np.nan)
23
# Keep the original dimension ordering so callers don't have to
24
# defensively transpose results. xarray broadcasting can sometimes
0 commit comments