Skip to content

Commit e8e2c0a

Browse files
committed
fix: do not use negative indices and switch to array-api compat flip
1 parent 636e92e commit e8e2c0a

File tree

1 file changed

+1
-1
lines changed
  • src/earthkit/meteo/extreme/array

1 file changed

+1
-1
lines changed

src/earthkit/meteo/extreme/array/cpf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def cpf(
148148
cpf_direct = _cpf(clim, ens, epsilon, from_zero)
149149

150150
if symmetric:
151-
cpf_reverse = _cpf(-clim[::-1, :], -ens[::-1, :], from_zero=from_zero)
151+
cpf_reverse = _cpf(-xp.flip(clim, axis=0), -xp.flip(ens, axis=0), from_zero=from_zero)
152152
mask = cpf_direct < 0.5
153153
cpf_direct[mask] = 1 - cpf_reverse[mask]
154154

0 commit comments

Comments
 (0)