Skip to content

Commit 1a5eb22

Browse files
committed
Replace ValueError with NotImplementedError
1 parent 15c709e commit 1a5eb22

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

cf_xarray/helpers.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,15 +332,16 @@ def _get_ordered_vertices(
332332
if _is_bounds_monotonic(bounds):
333333
vertices = np.concatenate((bounds[..., :, 0], bounds[..., -1:, 1]), axis=-1)
334334
else:
335+
335336
if order == "ascending":
336337
endpoints = np.minimum(bounds[..., :, 0], bounds[..., :, 1])
337338
last_endpoint = np.maximum(bounds[..., -1, 0], bounds[..., -1, 1])
338339
elif order == "descending":
339340
endpoints = np.maximum(bounds[..., :, 0], bounds[..., :, 1])
340341
last_endpoint = np.minimum(bounds[..., -1, 0], bounds[..., -1, 1])
341-
elif order == "mixed":
342-
raise ValueError(
343-
"Cannot determine vertices for non-monotonic bounds with mixed core "
342+
else:
343+
raise NotImplementedError(
344+
f"Cannot determine vertices for non-monotonic bounds with {order} core "
344345
"dimension orders. Try normalizing the coordinates to a monotonic "
345346
"convention and try again."
346347
)

0 commit comments

Comments
 (0)