Skip to content

Commit b4198d3

Browse files
committed
Code refactoring
1 parent c46a001 commit b4198d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pysteps/extrapolation/semilagrangian.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ def extrapolate(
110110
if velocity.ndim != 3:
111111
raise ValueError("velocity must be a three-dimensional array")
112112

113-
if precip is not None and not allow_nonfinite_values:
114-
if np.any(~np.isfinite(precip)):
113+
if not allow_nonfinite_values:
114+
if precip is not None and np.any(~np.isfinite(precip)):
115115
raise ValueError("precip contains non-finite values")
116116

117117
if np.any(~np.isfinite(velocity)):

0 commit comments

Comments
 (0)