Skip to content

Commit ced3acb

Browse files
committed
chore: prefer zeros_like to zeros
1 parent defa84e commit ced3acb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/earthkit/meteo/thermo/array/es_comp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def _es_mixed(t, xp):
148148
# svp = alpha * es_water + (1.0 - alpha) * es_ice
149149

150150
t = xp.asarray(t)
151-
svp = xp.zeros(t.shape, dtype=t.dtype, device=xp.device(t))
151+
svp = xp.zeros_like(t, dtype=t.dtype)
152152

153153
# ice range
154154
i_mask = t <= TI
@@ -176,7 +176,7 @@ def _es_ice_slope(t, xp):
176176

177177
def _es_mixed_slope(t, xp):
178178
t = xp.asarray(t)
179-
d_svp = xp.zeros(t.shape, dtype=t.dtype, device=xp.device(t))
179+
d_svp = xp.zeros_like(t, dtype=t.dtype)
180180

181181
# ice range
182182
i_mask = t <= TI

0 commit comments

Comments
 (0)