Skip to content

Commit 36b6128

Browse files
committed
clearer logic
1 parent 3423526 commit 36b6128

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cf/regrid/regrid.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,9 +371,7 @@ def regrid(
371371
else:
372372
raise ValueError("Can't set both 'z' and 'src_z'")
373373

374-
elif (src_z is None and dst_z is not None) or (
375-
src_z is not None and dst_z is None
376-
):
374+
elif (src_z is None) != (dst_z is None):
377375
raise ValueError(
378376
"Must set both 'src_z' and 'dst_z', or neither of them"
379377
)

0 commit comments

Comments
 (0)